Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Facebook API module for nodejs
JavaScript
tree: ba9ca4a952

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
fb.js
package.json
readme.md

readme.md

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 requirejs framework https://github.com/mikeal/request#requestoptions-callback (note: extra feature is https: true).

Something went wrong with that request. Please try again.