Created
February 10, 2012 12:03
-
-
Save patelrohan/1789083 to your computer and use it in GitHub Desktop.
Logout from application using Facebook a/c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//logout mehthod========================*******************=============== | |
- (void)logOutButtonPressed { | |
NSLog(@"logout"); | |
fbGraph.accessToken = nil; | |
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]; | |
} | |
} | |
[self loginButtonPressed:nil]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment