0.1.5 • Published 6 years ago

botbuilder-facebook-connector v0.1.5

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

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
    • 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

Supported receive components

  • Quick replies
  • Buttons
    • Buy button ref
    • Call button ref
    • Game play button ref
    • Login button ref
    • Logout button ref
    • Postback button ref
    • Share button ref
    • URL button ref
  • Templates
    • Button template ref
    • Generic template ref
    • List template ref
    • Media template ref
    • 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