JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q40727F
  • License GPL-3.0

Facebook Graph API SDK for NodeJS

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)

  1. install the module
npm install graph-api
  1. require the module
const fb = require('graph-api');
  1. 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'.

  1. (for apps only) get an access token
fb.getToken(callback_url, perms, scope)
  1. 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...

hope you enjoy it