I have seen a lot of question / answer but not any solution is working.
My problem is that, when we logout from facebook and try to login then it is not asking for username and password, just logged in using the previous user account. Is there any way to logout completely. I have tried following code also but not succeed.
NSHTTPCookie *cookie;
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (cookie in [storage cookies])
{
NSString* domainName = [cookie domain];
NSRange domainRange = [domainName rangeOfString:@"facebook"];
if(domainRange.length > 0)
{
[storage deleteCookie:cookie];
}
}
I have also tried:
-[FBSession closeAndClearTokenInformation]
but same result. Please help me guys!