Closed ksaitor closed 9 years ago
Here is what I use with bluebird:
var Promise = require("bluebird");
var Graph = require('fbgraph');
Promise.promisifyAll(Graph);
Then you can call functions like:
Graph.authorizeAsync()
Graph.getAsync()
Graph.batchAsync()
...
Hope it helps :)
Thanks @tleunen. I actually did that in my project, a while ago. However, realised that some devs might not be aware that Bluebird
and promisifyAll
exist, hence built in promises might be handy. No?
How about a section in the docs on how to add bluebird to it?
If it can be done with promisifyAll
, adding it to the the lib seems unnecessary
Would be awesome to have promises. E.g. with https://github.com/petkaantonov/bluebird
FTW!