Created
February 7, 2013 00:05
-
-
Save badeen/4727126 to your computer and use it in GitHub Desktop.
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
[[FBSession activeSession] closeAndClearTokenInformation]; | |
if (NSClassFromString(@"ACAccountStore")) { | |
ACAccountStore *accountStore = [[ACAccountStore alloc] init]; | |
if ([accountStore respondsToSelector:NSSelectorFromString(@"ACAccountStoreRemoveCompletionHandler")]) { | |
ACAccountType *fbType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; | |
NSArray *accounts = [accountStore accountsWithAccountType:fbType]; | |
ACAccount *account = [accounts lastObject]; | |
if (account) { | |
[accountStore renewCredentialsForAccount:account completion:^(ACAccountCredentialRenewResult renewResult, NSError *error) { | |
}]; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment