fb-messenger-bot-express
v0.0.3
Published
Simple Express middleware for facebook messenger bot platform
Downloads
20
Maintainers
Readme
fb-messenger-bot-express
fb-messenger-bot-express is a node.js package for providing a Connect/Express middleware that can be used to provide the required endpoints for facebook messenger bot platform.
Installation (via npm)
$ npm install fb-messenger-bot-express
Usage
Simple Usage
var express = require('express')
, fbb = require('fb-messenger-bot-express')
, app = express();
app.use(fbb());
Set your incoming message callback function
var express = require('express')
, fbb = require('fb-messenger-bot-express')
, app = express();
app.use(fbb({
incoming: function(req, res) {
// handle incoming messages
}
}));
Configuration Options
validationCode
: Configures the validation code for your webhook.route
: Configures the webhook pathincoming
: Callback function for incoming messages from facebook messenger.
The default configuration is the equivalent of:
{
"validationCode": "fbvalidation",
"route": "/messenger",
"incoming": function(req, res) {}
}
License
Author
Patrick Zimmermann ([email protected])
knowhere GmbH (https://knowhere-media.de, https://github.com/knowhereto)