bot-connector-facebook
v0.2.0
Published
Bot connector for facebook
Downloads
7
Readme
Bot Connector Facebook
Bot connector for facebook which can be used with thebot-worker-engine
on AWS-Lambda
Installation
npm install bot-connector-facebook
Usage
const {
lambda,
normalize,
response,
userData
} = require('bot-connector-facebook')
const workers = require('./workers') // your bot specific workers
const persistence = require('<persistence-layer>')
const handler = (input) => {
// handle the normalized input, i.e. with https://github.com/DieProduktMacher/bot-worker-engine
orchestrate({input, workers, persistence, response, userData})
}
module.exports = {
main: (event, _, callback) => {
lambda.main(event, handler, normalize, callback)
},
verify: (event, _, callback) => {
lambda.verify(event, callback)
}
}