嗨,我正在尝试获取使用我的应用程序的 Facebook 朋友列表,当我尝试此功能时,我得到了空数据
我的示例代码
let request: FBSDKGraphRequest = FBSDKGraphRequest(graphPath: "me/friends", parameters: nil, HTTPMethod: "GET")
request.startWithCompletionHandler { (connection : FBSDKGraphRequestConnection!, result : AnyObject!, error : NSError!) -> Void in
if error == nil {
print("Friends are : \(result)")
} else {
print("Error Getting Friends \(error)");
}
}
我的输出是
FBSDKLog: starting with Graph API v2.4, GET requests for /me/friends should contain an explicit "fields" parameter
ID is: 964865453559288
2015-12-21 18:25:55.635[12226:218972] fb_id 964865453559288
Friends are : {
data = (
);
}