criso / fbgraph

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

How do you check if it's already logged in? #24

Closed rafaelfaria closed 11 years ago

rafaelfaria commented 11 years ago

Is there any way to store that in a session, or there is a function like "graph.isLoggedIn() " that would make it easier to know if it's already logged in on another page?

bergman commented 11 years ago

There is a function graph.getAccessToken() that you could use for that. It should return null if you're not logged in and an access token if you are. It will not guarantee that the access token is valid or anything like that though.