我使用的是 iOS sdk v3.18.1,我想获取我所有的 Facebook 好友。我可以获取好友数,但是数据为零。
这是我的代码
[FBRequestConnection startWithGraphPath:@"me/friends" parameters:nil HTTPMethod:@"GET" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
NSLog(@"result %@",result);
}];
输出
{
data = (
);
summary = {
"total_count" = 840;
};
}
最佳答案
https://developers.facebook.com/docs/apps/changelog
从 v2.0 开始,您无法再获得完整的好友列表,您也只能获得授权您的 App 的好友。
在这个线程中也看到我的答案:how to get a list of all user friends (not only who use the app)?