无法使用facebook-graph-api version2.0获取Facebook朋友列表 [英] Not able to get facebook friend list using facebook-graph-api version2.0

查看:49
本文介绍了无法使用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审核指南

这篇关于无法使用facebook-graph-api version2.0获取Facebook朋友列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆