Facebook Albums - AccessToken not working when logged out from facebook

Topics: Standard packages
Jun 8, 2012 at 7:18 AM


I'm writing a blogpost about the Facebook-Albums-Package.

When I try to get photos from my personal facebook account, I need an access token as described here:


Everything works fine, until I log out from facebook.

Then I get the following error:

 (OAuthException) Error validating access token: The session is invalid because the user logged out.


Jun 8, 2012 at 8:37 AM
Edited Jun 8, 2012 at 8:40 AM


The issue was investigated.

Recently Facebook's disabled the use of "offline access permissions" by default so now you need another step to explicitly enable these permissions - http://developers.facebook.com/roadmap/offline-access-removal/

We updated our document and described additional step:

2.  Edit the advanced settings of the app and disable removing offline access permissions (YOUR_APP > Edit Settings > Advanced > Migrations > Remove offline_access permission > Disable).

3. ...


Jun 8, 2012 at 8:39 AM
Edited Jun 8, 2012 at 8:40 AM

Oh my, it looks like the offline_access permission has been removed, which were necessary to use the token even when you're not logged in to Facebook :(


The docs-page should be updated to include the now necessary "Deprecate offline access" setting, which should give you a token which is valid for 60 days. Its only like peeing in your pants though, since this token would need to be renewed every 60 days by re-authorizing the app. I would have to look into a more permanent solution.

Jun 8, 2012 at 9:04 AM

Hi Inna and Pauli,

thanks for your quick reply and the explanation of the problem - so I will write my blogpost about using the package with public facebook sites without this token - the need to use an accesstoken is only for pictures from personal profiles, which is not the most common usage of this package for the most people.