Using Facebook sdk, facing the strange problem. Even after logging out from Facebook, fb is not asking for the credentials just telling you are already authorized to the app. Below is the code using for logout.
if (FBSession.activeSession.isOpen) {
[[FBSession activeSession] closeAndClearTokenInformation];
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];
}
}
}
Here storage is nil thus not entering in to the loop.
I know this question is asked many times earlier also, but not got the solution from them.
Aucun commentaire:
Enregistrer un commentaire