如何重置iOS应用程序中的所有Facebook权限?
我正在开发一个应用程序的iOS和testing应用程序,我需要清除/重置所有的Facebook权限…怎么能这样做?
如果检查权限白图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; } );
我想清除所有的权限..这是可能的?
是的。 这是一个例子。
[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/ } }];
例如,如果你想删除一个特定的权限只是改变path,在这里我撤销了publish__actions权限startWithgraphPath:@"/me/permissions/publish_actions"
这里是有权限的列表。