从App分享到Facebook

时间:2015-09-07 15:33:31

标签: ios facebook facebook-graph-api permissions facebook-login

当我尝试Share on Facebook通过应用时,我遇到了这个问题

Error for request to endpoint 'me/photos': An open FBSession must be specified for calls to this endpoint.

这就是我试图做的事情

 [FBSession openActiveSessionWithPublishPermissions:[NSArray arrayWithObjects:@"publish_actions",@"publish_stream",nil]
                                           defaultAudience:FBSessionDefaultAudienceOnlyMe
                                              allowLoginUI:YES
                                         completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {

                                             [self postImageToFb];
                                         }];

提前致谢!

0 个答案:

没有答案