Facebook从/ me / friends返回空数组 [英] Facebook returning empty array from /me/friends

查看:112
本文介绍了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返回空数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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