Closed 0xdeafcafe closed 9 years ago
try
var result = wait.forMethod(graph,'get', url, { });
Yeah, I tried that also. Exactly the same output.
1) if you do:
graph.get (url, { }, function(err,data){
console.log(err,data);
});
what do you get?
2) what's with the "{ }" ? try also:
graph.get (url, function(err,data){
console.log(err,data);
});
I'm not familiar with the fbgraph lib, but wait.for does nothing especial but calling the function just adding a parameter : callback(err,data)
wait.forMethod does the same, but bind the called function (sets "this") with the first parameter, effectively calling a "method".
Ah yes, get
was returning an error and that was just returning object. Fixed my logic calling get
, and it's working fine. Thanks!
When using the library, it hits the following line: (where graph.get is from the fbgraph npm package)
It just outputs
[object Object]
to the console, and prematurely ends execution of my application. The full source code is as follows:And the full console output is: