Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Facebook API module for nodejs
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

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

readme.md

fb-api

A Nodejs module for interpreting requests via a signed request.

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 defaults: appID, appSecret, url, timeout, accessToken.

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

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).

Update 3/30

Something went wrong with that request. Please try again.