Facebook now includes “Session has expired” detail information if that is the case for invalid access token

I believe facebook is keep on “enhancing” how they check the access token.

Today, I have received an error message with content

Error: OAuthException: Error validating access token: Session has expired at unix time 1304348400. The current unix time is 1304348963.

There is nothing wrong with that error and in fact, I am happy to see that!  At that time, the session is left opened for a long time without any activity.

In the past, I simply get a general error message telling me something is wrong with the access token.  But now, I can tell the session has expired!  This helps the support in case users report this error to me.

This entry was posted in Development Tips, news and tagged , . Bookmark the permalink.

2 Responses to Facebook now includes “Session has expired” detail information if that is the case for invalid access token

  1. ozgur says:

    Could u tell how to handle the expired session programatically?

    • takwing says:

      if you are using the php sdk, that error should be caught as an exception.
      Then search of the marker text such as “Session has expired”, if you find it, then just initiate the OAuth flow once again.

Leave a Reply

Your email address will not be published. Required fields are marked *