Package Exports
- graph-api
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (graph-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
fb-sdk
Facebook Graph API SDK for NodeJS (still in development)
Basic tutorial (until I have more time to do a better one)
- install the module
npm install graph-api- require the module
const fb = require('graph-api');- set the options
fb.options(platform, secret, identifier);platform can be: self - for end user's with an access token.
app - for app with secret and appid
secret: your access token or app secret
identifier: the user's or app's id. the default value for 'self' platform is 'me'.
- (for apps only) get an access token
fb.getToken(callback_url, perms, scope)- make a query
fb.get(['id', 'name'], function(JSON)
{
console.log(JSON);
});The query is async, so you need to manipulate things inside the callback function, in future I will find a way to make the use easier than now... The getAccess token function don't make requests, still gonna fix that... This sdk don't have post functionality I still working on it tought...