Library for connecting to Facebook directly using BotBuilder.
Install
npm install botbuilder-facebook-connector --save
You can create the connector by passing the settings for connecting to Facebook, or by passing a messenger-bot instance
// passing settings
let connector = new FacebookConnector(null, {
token: process.env.FACEBOOK_TOKEN,
verify: process.env.FACEBOOK_VERIFY,
});
// passing messenger-bot instance
import { FacebookConnector } from "botbuilder-facebook-connector";
import * as Bot from "messenger-bot";
let messengerBot = new Bot({
token: process.env.FACEBOOK_TOKEN,
verify: process.env.FACEBOOK_VERIFY,
});
let connector = new FacebookConnector(messengerBot);
- Cards
- Hero card
- Thumbnail card
- Receipt card
- Sign-in card
- Animation card
- Audio card
- Video card (I get no response from facebook on this one, no idea why)
- Adaptive card, not supported by facebook, Microsoft just renders to an image, more info
- Quick replies
- Buttons
- Templates