如何在iOS应用中重置所有Facebook权限? [英] How to reset all Facebook Permission in an iOS app?

查看:70
本文介绍了如何在iOS应用中重置所有Facebook权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

i'm developing an application for iOS and for test app, i need clear/reset all facebook permission... how can do this?

如果检查权限丝毫图路径,我会看到此日志

if check the permission whit graph path, i see this log

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

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

i want to clear all permission.. it's possible?

推荐答案

是的.这是一个例子.

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

For example,if you want to delete an specific permissions just change the path, here i'm revoking the publish__actions permissions startWithgraphPath:@"/me/permissions/publish_actions"

此处是具有权限的列表.

这篇关于如何在iOS应用中重置所有Facebook权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆