while i was trying to integrate fbsdk(facebook) to my app ,it's login session working perfectly.But while i log out from mp app,it does show log out actionsheet
and i can logout it easily.But when i try to login again to the facebook it goes directly to the facebook confirmation page instead of going to the login page details.Hope your help.
codes i used for logout.
FBSDKLoginManager *manager = [[FBSDKLoginManager alloc] init];
[FBSDKAccessToken setCurrentAccessToken:nil];
[FBSession.activeSession closeAndClearTokenInformation];
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for(NSHTTPCookie *cookie in [storage cookies])
{
NSString *domainName = [cookie domain];
NSRange domainRange = [domainName rangeOfString:@"facebook"];
if(domainRange.length > 0)
{
[storage deleteCookie:cookie];
}
}
[manager logOut];
I have reported this to Facebook both as a bug and later as a security concern (you log out of something and then you can log in later without using a password again...).
They answered that this is not a bug, but a feature. "By design".
The only way to log out seems to be to call an url from the phone: https://m.facebook.com/logout.php?h=[a 16 character long token-like string]&t=[10 char long number]&refid=[a number]
From this the "h" attribute seems to be obligatory. If you omit everything else, it still works. One problem though: I don't know what this string is. Any ideas?
Or other methods to log out?