NodeJS Library for Facebook Graph API
With fb-graph-api you can now easily make requests to Facebook's Graph API.
Author: CoericK
License: Apache v2
Installing fb-graph-api with npm
npm install --save fb-graph-api
Installing fb-graph-api with yarn
yarn add fb-graph-api
var FBGraphAPI = require('fb-graph-api').FBGraphAPI;
import {FBGraphAPI} from 'fb-graph-api';
Library usage
var FB = new FBGraphAPI({
clientID: '...',
clientSecre: '...',
appAccessToken: '...'
});
const FB = new FBGraphAPI({
clientID: '...',
clientSecret: '...',
appAccessToken: '...'
});
Graph API
generateAppAccessToken
Generates the App Access Token for you.
FB.generateAppAccessToken()
.then(appAccessToken => {
console.log('appAccessToken', appAccessToken);
})
.catch(e => console.log('e', e));
debugToken
Debugs a given token using the App Access Token.
FB.debugToken('EAAJ3bm5M....')
.then(data => {
console.log('debuggedToken', data);
})
.catch(e => console.log('e', e));