来自Facebook的即将到来的朋友BirthDay List

时间:2012-06-08 09:13:47

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

我怎样才能获得有关用户ID,姓名和出生日的朋友即将到来的b'days列表。我正在使用以下fql查询来获取朋友b'day列表。

  query = "SELECT uid, name, birthday_date FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me()) ORDER BY birthday_date DESC LIMIT 50 ";

1 个答案:

答案 0 :(得分:1)

将您的FQL查询更改为:

SELECT uid, name, birthday_date FROM user
WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me())
AND birthday_date >= "06/08"
AND birthday_date <= "06/15"
ORDER BY birthday_date ASC

这将约束下一个可用生日的下一周的日期。