ios – Facebook requestForMyFriends没有返回朋友数据

ios – Facebook requestForMyFriends没有返回朋友数据,第1张

概述参见英文答案 > Facebook Graph API v2.0+ – /me/friends returns empty, or only friends who also use my application                                    7个 我使用FBRequest来请求用户的好友列表. FBRequest *requestFriendList = 参见英文答案 > Facebook Graph API v2.0+ – /me/friends returns empty,or only friends who also use my application                                    7个
我使用FBRequest来请求用户的好友列表.

FBRequest *requestFrIEndList = [FBRequest requestForMyFrIEnds];[requestFrIEndList startWithCompletionHandler:^(FBRequestConnection *connection,ID result,NSError *error){                 if (!error)                 {                     NSArray *fbFrIEnds = [result objectForKey:@"data"];                     //...                 }             }];

但是,请求的返回结果不包含任何数据.我打印出结果,它包含朋友计数,但里面没有数据.

Printing description of result:{    data =     (    );   summary =     {        "total_count" = 585;    };}

如果请求失败或应用程序没有权限,是否应该返回错误或“total_count”也未显示?

那么我做错了什么吗?有人可以帮我解决这个问题吗?

谢谢!!

解决方法 Graph API 2.0改变了/ frIEnds端点的行为.
它现在返回已授权您的Facebook应用程序的朋友列表,而不是完整的朋友列表.它也是一个新的权限 – user_frIEnds.
从 Facebook Platform Changelog:

FrIEnd List is no longer part of the default permission set and has
its own permission: Asking for access to a person’s frIEnd List is Now
a separate permission that your app must request. The new permission
is called user_frIEnds.

FrIEnd List Now only returns frIEnds who also use your app: The List of frIEnds returned via the /me/frIEnds endpoint is Now limited to the List of frIEnds that have authorized your app.

总结

以上是内存溢出为你收集整理的ios – Facebook requestForMyFriends没有返回朋友数据全部内容,希望文章能够帮你解决ios – Facebook requestForMyFriends没有返回朋友数据所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1024596.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-23
下一篇2022-05-23

发表评论

登录后才能评论

评论列表(0条)

    保存