0

I implemented login screen by using twitter authentication after successful login screen navigates to home screen its works fine. When I come back and clicks on twitter login it does not asks credentials. It directly redirects the app into home page. So please help me how to remove cookies or session of twitter.

Thanks in advance.

Jithin
  • 1,692
  • 17
  • 25
Mouli
  • 1

2 Answers2

0

Have you tried dealing with NSHTTPCookieStorage like in this SO question?

Community
  • 1
  • 1
keyv
  • 2,430
  • 1
  • 18
  • 15
0

Use this code...

NSHTTPCookieStorage *cookieList = [NSHTTPCookieStorage sharedHTTPCookieStorage];
    for (NSHTTPCookie *x in cookieList.cookies) {
       //if ([[x valueForKey:@"domain"] isEqualToString:@".twitter.com"]) { 
      // Do your stuff
           [cookieList deleteCookie:x]; 
       //}
}

Read: NSHTTPCookieStorage_Class and NSHTTPCookie_Class

Where are an UIWebView's cookies stored?

How to get completely logout from FHSTwitterEngine in Twitter Rest API v1.1?

Community
  • 1
  • 1
Yuyutsu
  • 2,509
  • 22
  • 38