I am doing login using facebook section of my iphone app. I want to send the access token to the server side. Now i am facing this problem. I can login successfully with a new account, but when I log out and then again log in, I am getting the error response like this:
error = "OAuthException: Error validating access token: Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook has changed the session for security reasons.
Kindly give some suggestions to solve this issue.
logout method:
-(void)logoutFb{
[_facebook logout:self];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"FBAcessToken"]
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"FBExpDate"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
I solved the issue. Earlier i was asking for these permissions only:
publish_stream
,read_stream
,offline_access
Now I added email & user_birthday also.
Did some corrections in the webservice too.