botbuilder-facebook-connector

0.1.5 • Public • Published

BotBuilder Facebook Connector

Library for connecting to Facebook directly using BotBuilder.

Usage

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);

Supported send components

  • [ ] Cards
    • [x] Hero card
    • [x] Thumbnail card
    • [ ] Receipt card
    • [ ] Sign-in card
    • [x] Animation card
    • [x] 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

Supported receive components

  • [x] Quick replies
    • [x] Text ref
    • [x] Location ref
  • [ ] Buttons
    • [ ] Buy button ref
    • [ ] Call button ref
    • [ ] Game play button ref
    • [ ] Login button ref
    • [ ] Logout button ref
    • [x] Postback button ref
    • [x] Share button ref
    • [x] URL button ref
  • [ ] Templates
    • [ ] Button template ref
    • [x] Generic template ref
    • [x] List template ref
    • [x] Media template ref
    • [x] Open graph template ref
    • [ ] Receipt template ref
    • [ ] Airline boarding pass template ref
    • [ ] Airline check-in reminder template ref
    • [ ] Airline itinerary template ref
    • [ ] Airline flight update template ref

Readme

Keywords

none

Package Sidebar

Install

npm i botbuilder-facebook-connector

Weekly Downloads

0

Version

0.1.5

License

MIT

Last publish

Collaborators

  • xzya