简体   繁体   English

除了那些在同一个应用程序上的朋友之外,Facebook GET朋友API调用不会返回任何朋友

[英]Facebook GET friends API call not returning any friends besides those who are on the same app

In our game, we have been using the following block of code to retrieve and perform operations on the friends of the user who have not played our game. 在我们的游戏中,我们一直使用以下代码块来检索和执行未玩游戏的用户的朋友的操作。

FB.api '/me/friends?fields=installed,name,picture', (friendsList) ->
  if friendsList.error?
    // ... reject
    return
  friendsList = _(friendsList.data).filter (friend) -> not friend.installed
  // ... do something with the friends list

This worked fine until just recently (within the past week, just caught it today), when suddenly the friendsList being returned has a length of one before it gets filtered and includes just my only friend who has also installed the app and is currently playing it. 这个工作正常,直到最近(在过去的一周内,刚刚在今天发现它),突然被返回的friendsList在被过滤之前的长度为1,并且包括我唯一的朋友,他也安装了应用程序并且正在播放它。 The filter we're applying on the data isn't causing this because the data pre-filter only includes this one friend. 我们在数据上应用的过滤器不会导致这种情况,因为数据预过滤器只包含这一个朋友。 The console isn't throwing any error, the response of friends just no longer includes anyone except the people who are also playing the app as far as I can tell. 控制台没有抛出任何错误,朋友的响应不再包括任何人,除了那些正在玩应用程序的人,据我所知。 I definitely have friends who are not blocking apps from returning them in the results, too, so there should be at least some results. 我肯定有朋友也没有阻止应用程序在结果中返回它们,所以应该至少有一些结果。

What's going on? 这是怎么回事? Did Facebook change their API recently for how this request works? 最近Facebook是否更改了他们的API以了解此请求的工作原理? I haven't been able to find any documentation on an update to the API recently, so I'm really confused as to why this block of code is no longer behaving as expected. 我最近没能找到关于API更新的任何文档,所以我真的很困惑为什么这段代码不再按预期运行。

I have the same problem with my api. 我的api遇到了同样的问题。 I think facebook will no longer allow to retrieve friends that didn't use the app before. 我认为Facebook将不再允许检索之前未使用该应用的朋友。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM