iOS Facebook权限重置



我有一个用例如下。。。
1。用户点击facebook分享按钮
2。用户响应不想共享信息以提示
3。用户再次点击facebook分享按钮
4。期望的结果-用户被拒绝授予发布权限
 nbsp;实际结果-requestAccessToAccountsWithType自动返回granted=false。

这是执行请求的代码。。。

    ACAccountType *fbAccountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
    [self.accountStore requestAccessToAccountsWithType:fbAccountType options:@{ACFacebookAppIdKey : IPHONE_FB_APP_ID,
                             ACFacebookPermissionsKey : @[@"publish_actions"],
                                ACFacebookAudienceKey : ACFacebookAudienceFriends}
                                            completion:^(BOOL granted, NSError* error)
     {
         //call back for access granted
         if(granted)
         {
             // Granted consent
         }
         else
         {
             NSLog(@"Facebook account access not granted, %@", error);
         }
     }];

是否要重新尝试用户的权限?

不,没有。用户负责在iOS设置应用程序中对其进行控制。

最新更新