0

I have just updated to iOS6.1 and am getting this error.

error : Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0x1ed55780 {com.facebook.sdk:ParsedJSONResponseKey={
body =     {
    error =         {
        code = 190;
        "error_subcode" = 463;
        message = "Error validating access token: Session has expired at unix time 1360246752. The current unix time is 1360587404.";
        type = OAuthException;
    };
};
code = 400;
}, com.facebook.sdk:HTTPStatusCode=400}

I have not had any of this expired session errors before. I have Facebook SDK 3.1.1 and am building to iOS 6.1 . I am catching this error but am not sure if there is a step to renew the session. Wasn't this fixed with Facebook iOS SDK 3.1.1 ? I did upgrade the Facebook app just in case.

I am handling a session closing the session:

- (void)applicationWillTerminate:(UIApplication *)application
{
// Saves changes in the application's managed object context before the application terminates.
// close notification in order to do cleanup
[FBSession.activeSession close];

Any ideas stackoverflow Lords? Thanks in advance.

Note: I have tried to force the session to close and clear the session data to use:

[FBSession.activeSession closeAndClearTokenInformation];

Without any change to the expired session. It is just not making a new session.

elliotrock
  • 3,410
  • 3
  • 22
  • 25

1 Answers1

0

I hacked/solved this through turning off permission to use Facebook for this app in the iOS Settings > Facebook.

Then I built the app in xcode to force that error related to settings permissions. Turn on permissions then built it again and it ran swell.

But it seems a hack to do this an I am concerned that is might happen once the app is published.

elliotrock
  • 3,410
  • 3
  • 22
  • 25