Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fb-graph-api

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fb-graph-api

With fb-graph-api you can now easily make requests to Facebook's [Graph API](https://developers.facebook.com/docs/graph-api).

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

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
// Using require() in ES5
var FBGraphAPI = require('fb-graph-api');

// Using ES2015 import through Babel
import FBGraphAPI from 'fb';

Library usage

// ES5
var FB = new FBGraphAPI({
    clientID: '...',
    clientSecre: '...',
    appAccessToken: '...' // Optional
    
});

// ES2015 w/ import through Babel
const FB = new FBGraphAPI({
    clientID: '...',
    clientSecret: '...',
    appAccessToken: '...' // Optional
});

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);
        /*
         * data would look like this...
        {
            "app_id": 000000000000000, 
            "application": "Social Cafe", 
            "expires_at": 1352419328, 
            "is_valid": true, 
            "issued_at": 1347235328, 
            "scopes": [
                "email", 
                "publish_actions"
            ], 
            "user_id": 1207059
        }
        */
    })
    .catch(e => console.log('e', e));

Keywords

FAQs

Package last updated on 03 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc