views:

124

answers:

1

I'm using Facebook's PHP SDK, and it's been great so far. However, I have a weird issue on one page. On this page, I make a call to the graph API, then later a call using FQL. On the second call, however, I get an "Invalid OAuth 2.0 Access Token" exception. Why would the token become invalid while the first call worked? I also use FQL (same exact query/code) elsewhere in my site, and it works just fine. Does anyone know what would cause this?

Update: First call is a graph call (/me?fields=email).. second is querying for current user's affiliation, if that helps.

A: 

Could be one of several things, but if I had to hazard a guess, I'd say that you're trying to access something out-of-session, and your oauth token doesn't include the offline_access permission for the resource being accessed.

Perhaps some more detail about the nature of your API calls/FQL queries would help us narrow it down.

Peter Bailey