FQL query php:如何查询用户评论的点赞数


FQL query php:how to make a query to find the number of likes got to the users comments

如何查询用户评论的点赞数

它必须基于一个对象,如提要帖子、事件等。一旦你知道你想在什么样的对象上获得评论,你就可以做:

fql?q=select user_likes from comment where fromid=me() and object_id in (....)

在where()中,不能在联接可索引列(如object_id)的情况下使用out子查询进行查询。这就是Facebook如何强迫你加入他们的索引表,以缩小结果(并阻止你进行像"select*"这样的全扫描查询)。

问题是,你必须选择一种对象来查看。例如,如果你想对用户发布的帖子发表评论:

fql?q=select user_likes from comment where post_id in (select post_id from stream where filter_key in (select filter_key from stream_filter where uid = me()))

您可以在可索引列(用*标记)上处理各种条件。在中测试

图形api浏览器

facebookfql注释表文档