Skip to content

@volonbolon /gist:3866796
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
ACAccountStore *as = [[ACAccountStore alloc] init];
[self setAccountStore:as];
ACAccountType *twitterAccountType = [[self accountStore] accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
[[self accountStore] requestAccessToAccountsWithType:twitterAccountType
withCompletionHandler:^(BOOL granted, NSError *error) {
if ( granted == NO ) {
[self showNoTwitterAccountAlert];
return;
}
NSArray *twitterAccounts = [[self accountStore] accountsWithAccountType:twitterAccountType];
if ( [twitterAccounts count] > 0 ) {
[self setTwitterAccount:[twitterAccounts lastObject]];
[self retrieveIDs];
} else {
[self showNoTwitterAccountAlert];
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.