2014-02-10 105 views
3

我從https://developers.facebook.com/apps創建應用程序,我越來越怪異的錯誤,如> FBSDKLog:FBSession:對發佈或管理權限的權限請求包含意外的讀取權限 1.我的Xcode捆綁ID與當前的匹配FB應用程式2.我用我的應用程序發佈簽到爲好友 我已經給權限發佈簽到如下面的代碼越來越怪異FBSDKLog

NSArray *permissions = [[NSArray alloc] initWithObjects: 
          @"public_profile", 
          @"basic_info", 
          @"user_friends", 
          @"status_update", 
          @"publish_actions", 
          @"publish_checkins", 
          @"user_checkins", 
          nil]; 

[FBSession openActiveSessionWithPublishPermissions:permissions defaultAudience:FBSessionDefaultAudienceEveryone allowLoginUI:YES completionHandler:^(FBSession *session, FBSessionState status, NSError *error) 

任何幫助將不勝感激-I'll提供更多信息如果需要謝謝..

回答

2

您需要將您的讀取權限請求與寫入權限分開,並按照該順序向用戶請求。

要請求讀取權限:

[FBSession openActiveSessionWithReadPermissions:@[@"basic_info", @"user_checkin"] 
            allowLoginUI:YES 
           completionHandler: 
^(FBSession *session, FBSessionState state, NSError *error) { 
    [self sessionStateChanged:session state:state error:error]; 
}]; 

要請求寫權限:

[[FBSession activeSession] requestNewPublishPermissions:@[@"publish_actions"] 
             defaultAudience:FBSessionDefaultAudienceFriends 
             completionHandler:^(FBSession *session, NSError *error) { 

}]; 

你可以閱讀更多關於Facebook iOS SDK Upgrade Guide新工藝;具體來說,請閱讀部分要求閱讀&分別寫入權限