Skip to content

Commit

Permalink
Check for OAuth authorization in canSendTweet
Browse files Browse the repository at this point in the history
  • Loading branch information
David W Sica committed Jan 12, 2012
1 parent 5fe0600 commit 921b89e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions DETweetComposeViewController/DETweetComposeViewController.m
Expand Up @@ -143,13 +143,14 @@ + (BOOL)canSendTweet
ACAccountType *twitterAccountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
NSArray *twitterAccounts = [accountStore accountsWithAccountType:twitterAccountType];
if ([twitterAccounts count] > 0) {
return YES;
canSendTweet = YES;
}
}
}
else {
canSendTweet = [OAuth isTwitterAuthorized];
}

if ([OAuth isTwitterAuthorized]) {
canSendTweet = YES;
}
return canSendTweet;
}

Expand Down

0 comments on commit 921b89e

Please sign in to comment.