a promise utility wrapper around facebook-node-sdk
Install
$ npm install --save fb_promise
Usage
import fb_promise from 'fb_promise';
fb_promise('4').then(res=> console.log, err=> console.err);
//=> {
"name": "Mark Zuckerberg",
"id": "4"
}
** Don't forget to handle rejected Promise **
You may encounter times you need to specify token or put in client sdk, you can also use
import { fbPromisify } from 'fb_promise';
import FB from 'fb';
FB.setAccessToken('access_token');
fbPromisify(FB.api)('4').then()...
API
You can check other usage here Everything is the same except you don't dealt with callback.
License
MIT © transedward