criso / fbgraph

NodeJs module to access the facebook graph api
http://criso.github.io/fbgraph/
1.09k stars 176 forks source link

Global access tokens #56

Closed chrisjhoughton closed 10 years ago

chrisjhoughton commented 10 years ago

Hi Cristiano,

This is more of a question than an "issue" as such, but I thought it was worth querying the fundamentals of how access tokens are set within the fbgraph module. Correct me if I'm wrong, but it looks like they're being set on a global application level rather than a user level. As a result, issues can be caused when:

The way I've got round this issue so far is by always calling graph.setAccessToken directly before any queries. Another way of handling this would be to require the module within individual queries, but I've never seen this done in node, there must be a reason for this...

So I guess my question is - was this by design? Am I missing or not considering something?

chrisjhoughton commented 10 years ago

Just seen https://github.com/criso/fbgraph/issues/19. Ignore this thread.