简体   繁体   English

facebook fql返回hometown_location的数据不一致

[英]facebook fql returning inconsistent data for hometown_location

I'm essentially trying to return hometown info for all my facebook friends. 我实质上是想返回我所有Facebook朋友的家乡信息。 This is the query that I would like to execute: 这是我要执行的查询:

SELECT name, uid, hometown_location FROM user WHERE uid in (SELECT uid2 FROM friend WHERE uid1 = me())

However, for some reason, this query returns 'null' for MOST users' hometown_location. 但是,由于某种原因,此查询对于MOST用户的hometown_location返回“ null”。 And YES, my permissions are correctly set. 是的,我的权限设置正确。

Let's take a random user, say with id = 805246. As mentioned before, the above query returns a null hometown location. 让我们以一个随机用户为例,其ID为805246。如上所述,上面的查询返回了一个空的家乡位置。 But, the following query CORRECTLY returns the hometowm_location: 但是,以下查询正确地返回了hometowm_location:

SELECT name, uid, hometown_location FROM user WHERE uid = 805246

As does this one: 与此一样:

SELECT name, uid, hometown_location FROM user WHERE uid IN (805246, 211375, 3438)

So what gives? 那有什么呢?

This is a bug with the API, and is here: https://developers.facebook.com/bugs/487611667944115 (Please be sure to goto the bug post and mark that you were able to reproduce it so that it gets more attention from FB to fix.) 这是API的错误,位于以下位置: https : //developers.facebook.com/bugs/487611667944115 (请务必转到该错误文章并标记为您能够复制它,以便它引起更多关注FB修复。)

You can find a similar stack overflow post here: http://facebook.stackoverflow.com/questions/14350661/facebook-api-friend-location-object-being-returned-with-empty-string-for-id-and 您可以在此处找到类似的堆栈溢出信息: http : //facebook.stackoverflow.com/questions/14350661/facebook-api-friend-location-object-being-returned-with-empty-string-for-id-and

Essentially a bulk request... like hitting the graph API with /me/friends?fields=id,location returns some users with null results for location, and just a small number of users with real data for location. 本质上是一个批量请求...就像使用/ me / friends?fields = id命中图形API一样,location返回的某些用户的位置结果为空,而只有少数用户的实际数据为位置。 If you then individually request any of those friends with the null locations, they come back with the full result. 然后,如果您单独请求这些具有空位置的朋友,他们将返回完整结果。

This started happening in conjunction with the release of Graph Search, so it may be related. 这是随着Graph Search的发布而开始发生的,因此可能是相关的。

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

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