Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

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

About

No description, website, or topics provided.

Resources

Releases

No releases published

Packages

No packages published