Facebook从/ me / friends返回空数组

编程入门 行业动态 更新时间:2024-10-10 06:18:30
本文介绍了Facebook从/ me / friends返回空数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

所以我使用2.3 API版本尝试访问/ me / friends列表,返回我所有也在使用该应用程序的朋友。除非它总是返回以下内容:

{data:[],summary:{total_count:889 } }

我已经尝试使用图形浏览器以及浏览器中的JS Sdk,没有运气。

我正在请求 user_friends 权限,它实际上是默认包含的。是的,我有很多朋友一直在使用我们的应用程序。我通过Facebook的调试器在线调试了令牌,并得出结论,令牌确实有这样的权限。

注意:我们的应用没有列在Facebook应用商店中。然而,这是公众可行的。

有人可以帮助吗?

解决方案

  • 需要使用user_friends权限的用户访问令牌来查看当前的朋友。
  • 这将只返回任何已经使用(通过Facebook登录)应用程序+发出请求的朋友。 / li>
  • 如果该人的朋友拒绝了user_friends的许可,该朋友将不会显示在此人的朋友列表中。
  • 如果用户是在上述请求中具有user-b的朋友,响应将包含user-b的User对象。如果他们不是朋友,它将返回一个空数据集。

您是否检查了?/ / p>

So I am use the 2.3 API Version trying to access the /me/friends list that returns all of my friends who are also using the app. Except, it always returns the following:

{ "data": [ ], "summary": { "total_count": 889 } }

I have tried using the Graph Explorer as well as the JS Sdk right within the browser with no luck.

I am requesting the user_friends permission and it is actually included by default. And yes, I have many friends who have been using our app. I debugged the token online via Facebook's debugger and concluded the token does indeed have that permission.

NOTE: Our app isn't listed in the Facebook app store. It is however Live and available to the public.

Can someone help?

解决方案

  • A user access token with user_friends permission is required to view the current person's friends.
  • This will only return any friends who have used (via Facebook Login) the app + making the request.
  • If a friend of the person declines the user_friends permission, that friend will not show up in the friend list for this person.
  • If user-a is friends with user-b in the above request, the response will contain the User object for user-b. If they are not friends, it will return an empty dataset.

Did you check this ?

更多推荐

Facebook从/ me / friends返回空数组

本文发布于:2023-11-26 21:32:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1635268.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数组   Facebook   friends

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!