2014-12-27 82 views
0

我想获取有关Facebook事件的信息。我有活动的ID。我发现这样的代码(1),但总是收到错误:Facebook iOS Graph API事件

FBSDKLog: Error for request to endpoint '/642xxxxxxxx/event': An open FBSession must be specified for calls to this endpoint.

即使我添加一些代码来打开FBSession。没有任何方法可以在没有FB UI的情况下使用登录用户等。

(1)

[FBRequestConnection startWithGraphPath:@"/642xxxxxxxx/event" 
             parameters:nil 
             HTTPMethod:@"GET" 
           completionHandler:^(
                FBRequestConnection *connection, 
                id result, 
                NSError *error 
                ) { 
            /* handle the result */ 
           }]; 

回答