【问题标题】:How to reset all Facebook Permission in an iOS app?如何在 iOS 应用中重置所有 Facebook 权限?
【发布时间】:2013-03-25 20:11:57
【问题描述】:

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

如果检查权限whit graph path,我会看到这个日志

[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;
    }
);

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

【问题讨论】:

    标签: ios facebook sdk permissions


    【解决方案1】:

    是的,是的。这是一个例子。

    [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"

    Here,是有权限的列表。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-04-20
      • 1970-01-01
      • 1970-01-01
      • 2012-02-23
      • 1970-01-01
      • 2012-09-01
      • 2010-12-13
      • 1970-01-01
      相关资源
      最近更新 更多