fb-api

Facebook api methods

#facebook-api A Nodejs module for interpreting requests via a signed request cookie.

#install npm install fb-api

#usage var FB = require("fb-api");

#global

FB.set({
    appID: [appId],
    appSecret:[appSecret]   
});
 

#instance

FB invocation takes an object and returns a new instance. You can pass configuration options to overide appID and appSecret

var instance = FB({
    signedRequest: [string]
});

#instance methods

parseSignedRequest returns a value

.parseSignedRequest();

getAccessToken takes a callback

.getAccessToken([optional-signedRequest-string], [callback(err, resp)]);

api takes an api method string, requestjs object and callback.

.api([api-method], [object], [callback(err, resp)]);

The object in the second parameter allows valid options using the requestjs framework https://github.com/mikeal/request#requestoptions-callback (note: extra feature is https: true).