1

我正在为 iOS 和测试应用程序开发应用程序,我需要清除/重置所有 facebook 权限......怎么能这样做?

如果检查权限白图路径,我会看到这个日志

[PF_FBRequestConnection startWithGraphPath:@"me/permissions"
                         completionHandler:^(PF_FBRequestConnection *connection, id result, NSError *error) {

                             NSLog(@"facebook_permission: %@",result);


                         }];

结果是

[6412:c07] facebook_permission: {
data =     (
            {
        "create_note" = 1;
        email = 1;
        installed = 1;
        "photo_upload" = 1;
        "publish_actions" = 1;
        "publish_stream" = 1;
        "share_item" = 1;
        "status_update" = 1;
        "user_about_me" = 1;
        "user_birthday" = 1;
        "user_location" = 1;
        "video_upload" = 1;
    }
);

我想清除所有权限..有可能吗?

4

1 回答 1

4

是的。这是一个例子。

[FBRequestConnection startWithGraphPath:@"/me/permissions"
                     parameters:nil HTTPMethod:@"delete"
                     completionHandler:^(FBRequestConnection *connection, id result,    NSError *error)                                                                               {
                      if (!error && result == true) {
                        // Revoking the permission worked
                        NSLog(@"Permission successfully revoked");
                      } else {
                        // There was an error, handle it
                        NSLog(@"here was an error");
                        // See https://developers.facebook.com/docs/ios/errors/
                      }
}];

例如,如果您想删除特定权限只需更改路径,这里我将撤销 publish__actions 权限startWithgraphPath:@"/me/permissions/publish_actions"

这里,是有权限的列表。

于 2014-03-09T21:13:39.353 回答