2013-01-14 223 views
0

當我登錄FB出現錯誤信息! 錯誤日誌: FBConditionalLog:FBSession:讀權限的權限請求包含意外的發佈或管理權限Facebook SDK 3.1登錄錯誤

- (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」權限沒有錯誤信息?

謝謝!

回答

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/

+0

謝謝!我試試看!非常感謝! – SimonKira

2

使用openActiveSessionWithPublishPermissions代替openActiveSessionWithReadPermissions。