I am using Fabric SDK for Twitter login into my app.
I want to remove session and cookie of Twitter from my iOS App. Because I am logging 1st time successfully from Twitter using this SDK. But if user wants to login from other credentials using Twitter into my app, then its not possible without clear session.
For clear session of Twitter, I am using following Code. But its not working.
[[Twitter sharedInstance]logOut];
[[Twitter sharedInstance]logOutGuest];
NSHTTPCookieStorage *cookieList = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (NSHTTPCookie *x in cookieList.cookies)
{
if ([[x valueForKey:@"domain"] isEqualToString:@".twitter.com"])
{
[cookieList deleteCookie:x];
}
}
Look forward to hearing your responses!