简体   繁体   中英

facebook fql returning inconsistent data for hometown_location

I'm essentially trying to return hometown info for all my facebook friends. 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. 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. But, the following query CORRECTLY returns the 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.)

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

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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