Package Exports
- fb-messenger-bot-api
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fb-messenger-bot-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
fb-messenger-bot-api
NodeJS Facebook Messenger API
Installation
npm install fb-messenger-bot-api
Setup
Import
const MessengerClient = require('fb-messenger-bot-api');
Initialize
const fbClient = new MessengerClient(process.env.PAGE_ACCESS_TOKEN);
Using proxy
const fbClient = new MessengerClient(process.env.PAGE_ACCESS_TOKEN, { hostname:process.env.PROXY_HOST, port: process.env.PROXY_PORT });
Creating facebook app
Messenger Profile
Setting Greeting Message
fbClient.setGreetingMessage('Message that will be visible first thing when opening chat window with your bot/page')
.then(...)