2014-12-27 129 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 */ 
           }]; 

回答