Facebook FQL获取用户列表并包含已安装的参数

时间:2012-04-12 06:55:53

标签: facebook facebook-graph-api facebook-fql

我想获得一个用户的朋友列表。在此列表中,我想知道哪些用户也安装了该应用程序。

根据https://developers.facebook.com/docs/reference/api/user/,可以通过图形api访问已安装的参数。

我正在尝试使用以下查询,但我无法获得结果。 (我在多行上拆分查询以获得可读性)

var query = "SELECT uid, name, first_name, last_name, pic_square, status, installed  FROM user ";
query +=  "where uid IN (SELECT uid2 FROM friend WHERE uid1 = " + Titanium.Facebook.uid + ")";
query += "order by first_name";

1 个答案:

答案 0 :(得分:2)

使用api explorer看看这个。您希望“is_app_user”作为FQL查询的字段并且未安装,因为它在fql中不存在但是是api端点

fql?q = SELECT uid,name,first_name,last_name,pic_square,status,is_app_user FROM user其中uid IN(SELECT uid2 FROM friend WHERE uid1 = me()

或尝试

https://developers.facebook.com/tools/explorer/433871385166/?method=GET&path=fql%3Fq%3DSELECT%20uid%2C%20name%2C%20first_name%2C%20last_name%2C%20pic_square%2C%20status%2C%20is_app_user%20FROM%20user%20where%20uid%20IN%20(SELECT%20uid2%20FROM%20friend%20WHERE%20uid1%20%3D%20me())