我通过以下代码请求访问 Twitter 帐户:
-(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");
}
}];
}
问题是当用户选择“不允许”时我再次调用此方法,但它只能正常工作 1 次。
第一次,它请求许可,如果用户选择“不允许”,请求警报 View 不再显示。我只看到日志“Not Grand”。
我们如何再次更新对 twitter 的请求访问权限,以便再次显示用于权限的 alertView?
最佳答案
我认为您只能在设置应用程序的推特部分中说(如果无法访问,则发送消息)用户允许应用程序再次使用推特。
关于ios - 如何在 iOS 中再次更新对 Twitter 帐户的请求访问权限?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20798251/