No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
index.js
package.json

README.md

Botkit Middleware to populate Facebook Messenger user info to a Botkit message

Installation

Add github repo url to package.json

Example:

var fbuser = require('botkit-middleware-fbuser')({
    accessToken:'<fb_access_token>',
    fields: ['first_name', 'last_name', 'locale', 'profile_pic','timezone','gender','is_payment_enabled'],
    logLevel:'error',
    expire: 24 * 60 * 60 * 1000, // refresh profile info every 24 hours
    storage: '<Botkit storage object>'
});


controller.middleware.receive.use(fbuser.receive)

A message object will have an additional field user_profile with the fields requested to Facebook API.

##Author

pinkku

Github: @pinkku