Closed damienfa closed 10 years ago
There's something wrong in your setup. I just tried: % npm install fbgraph % node
var graph = require('fbgraph') graph.fql("SELECT about FROM page WHERE name ='redbull'", function (err, resp) { console.log(err, resp)})
And the call went through
Sorry, I edited my issue. It only happens when you dedicate the function "graph.fql" to another var. Example : var fqlRequest = graph.fql; fqlRequest("SELECT about FROM page WHERE name ='redbull'", function (err, resp) { console.log(err, resp)})
Thanks,
Damien
On Thu, Jan 30, 2014 at 4:58 PM, Cristiano Oliveira < notifications@github.com> wrote:
There's something wrong in your setup. I just tried: % npm install fbgraph % node
var graph = require('fbgraph') graph.fql("SELECT about FROM page WHERE name ='redbull'", function (err, resp) { console.log(err, resp)})
And the call went through
Reply to this email directly or view it on GitHubhttps://github.com/criso/fbgraph/issues/42#issuecomment-33701192 .
Yeah, you shouldn't do that. You're losing scope.
When I try :
I get :
It's true, it cannot work ! Isn't it ? On line 340, if i replace "this.get" by "exports.get(", it works like a charm.
Does I make a bad usage of the lib ?
Thanks !