fb-easy

1.0.1 • Public • Published

fb-easy

FB Easy is a minimal layer for node that allows developer interactive with fbgraph. Save much time for developer reading facebook document.

Features:

  • Get user information (profile, note, group and event)
  • Get user feed (support query options)
  • Reaction with facebook post (like, unlike and many reaction of facebook)
  • Fast (without dependencies)
  • Using Promise (make easy to know and maintain)

Install

$ npm install fb-easy --save

Usage

const fbgraph = require('fbgraph');
const easy = require('fb-easy');

fbgraph.setAccessToken('<Your facebook access_token>')

let profile = new easy.Profile('100011596450508')

profile.spider({
    group: {
        type: 'simple',
        limit: 1
    },
}).then(response => {
    
    // Response data
}).catch(error => {
    
    // Error
})

API

Profile

.spider(options)

Get user information (profile, note, group and event)

.read_stream(time)

Get user feed (using moment.js instance for time)

Reaction

.like(action)

Reaction with facebook post, action (using keys read, unlike and like for action).

License

MIT © Hai Le Phu

Readme

Keywords

Package Sidebar

Install

npm i fb-easy

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • vietworm