无法使用facebook-graph-api version2.0获取Facebook朋友列表

无法使用facebook-graph-api version2.0获取Facebook朋友列表

问题描述:

我需要获取已登录用户的朋友列表.我正在使用

I need to fetch logged in user's friend list. I am using this

FBRequest* friendsRequest = [FBRequest requestWithGraphPath:@"me/friends" parameters:nil HTTPMethod:@"GET"];
[friendsRequest startWithCompletionHandler: ^(FBRequestConnection *connection,
                                              NSDictionary* result,
                                              NSError *error){
    NSArray* friends = [result objectForKey:@"data"];
    NSLog(@"Found: %i friends", friends.count);
    for (NSDictionary<FBGraphUser>* friend in friends){
        NSLog(@"%@", friend);
    }
}];

以及我需要传递参数和HTTPMethod的什么?
预先感谢.

and what i need to pass in parameters and HTTPMethod?
Thanks in advance.

最近的Facebook更新显示,现在4月30日之后,您需要在Review中提交Facebook App以获得user_friend的许可.

Recent Facebook update that now after 30 April you need to submit Facebook App in Review for getting permission for user_friend.

请参阅从3.13升级到3.14

  • 要求获得除 public_profile email user_friends 之外的其他内容的开发人员将需要提交其应用程序以供Facebook审核应用程序将请求的权限.有关详细信息,请参见权限指南.现有应用需要经过一年的审核,包括对现有应用的更新.在2014年4月30日之后创建的应用必须经过审核.

  • Developers asking for more than public_profile, email, and user_friends will need to submit their apps for review by Facebook to approve the permissions the app will request. See the Permissions Guide for details. Existing apps have one year before they are required to go through review, including updates to existing apps. Apps created after April 30th, 2014 must go through review.

在请求权限时(包括登录时),人们现在可以拒绝所请求的个*限.添加了一些新方法来帮助实现这一新流程:

When requesting permissions (including at time of login), people can now decline individual permissions requested. Several new methods have been added to help with this new flow:

请检查开发者Facebook审核指南