[英]How to renew request access to Twitter account again in iOS?
我通過以下代碼請求訪問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次。
第一次,它要求許可,如果用戶選擇“不允許”,則不再顯示詢問警報視圖。 我只看到日志“Not Grand”。
我們如何再次更新對twitter的請求訪問權限,以便再次顯示alertView的權限?
我想你只能說(如果沒有訪問權限的消息)用戶允許應用程序在設置應用程序的twitter部分再次使用twitter。
轉到設置並啟用允許這些應用程序手動將您的帳戶切換用於相應的應用程序。 點擊“不允許”后,開關將關閉。 讓用戶啟用Switch。
作為我的知識,這是不可能的一旦使用可以選擇不要再問的“不允許” 。 這與Address-book Permission
警報或Location Permission
。
因此,您可以設置“手動警報按摩”以允許“訪問自設置”設置,並且需要手動打開設置視圖並從那里登錄。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.