0

当我登录FB出现错误信息!!错误日志:FBConditionalLog:FBSession:读取权限的权限请求包含意外的发布或管理权限

- (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {
    NSArray *permissions = [NSArray arrayWithObjects:@"publish_actions", @"user_photos", @"email", nil];
    return [FBSession openActiveSessionWithReadPermissions:permissions
                                              allowLoginUI:allowLoginUI
                                         completionHandler:^(FBSession *session,
                                                             FBSessionState state,
                                                             NSError *error) {
                                             [self sessionStateChanged:session
                                                                 state:state
                                                                 error:error];
                                         }];

如何添加@“publish_actions”权限而不是错误消息?

谢谢!!

4

2 回答 2

2

使用 openActiveSessionWithPublishPermissions 而不是 openActiveSessionWithReadPermissions。

于 2013-02-23T15:49:05.330 回答
0

像这样的东西

NSArray *permissions = [NSArray arrayWithObjects:@"publish_actions", nil];

[[FBSession activeSession] reauthorizeWithPublishPermissions:permissions defaultAudience:FBSessionDefaultAudienceFriends completionHandler:^(FBSession *session, NSError *error) { /* handle success + failure in block */ }];

https://developers.facebook.com/docs/howtos/ios-6/

于 2013-01-14T14:59:48.723 回答