I request access to Twitter account by this code:
-(void)requestAccessToTwitterAccounts{
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
[accountStore requestAccessToAccountsWithType:accountType options:nil completion:^(BOOL granted, NSError *error) {
if (granted)
{
NSLog(@"Granted");
_twAccounts = [accountStore accountsWithAccountType:accountType];
if (_twAccounts.count > 0){
NSLog(@"%@",_twAccounts);
} else {
NSLog(@"No Accoutn");
}
} else{
NSLog(@"Not Grand");
}
}];
}
The problem is that I call this method again when user choose "Don't Allow" but it just work OK 1time.
1st time, it ask for permission, if user choose "Don't Allow", the asking alert view not display again. I just see the log "Not Grand".
How can we renew request access to twitter again so that the alertView for permission display again?
I think you only can say (message if there are no access) user to allow app to use twitter again in twitter section in settings app.