开发者

FQL: retrieve objects from stream table that user liked

As described in the sample on documents, we can retrieve the user's news feed as below.

SELECT post_id, actor_id, target_id, message FROM stream WHERE source_id in (SELECT target_id FROM connection WHE开发者_开发百科RE source_id= AND is_following=1) AND is_hidden = 0

What I want to do is to display user's news feed and when user clicks "my favorite", display the summary(all posts that a user liked).

Any idea?

Thanks.


Add this criteria to your query AND likes.user_likes = 1 and you should get it. From example i do this to get all that i have liked in my wall: https://api.facebook.com/method/fql.query?query=SELECT post_id, message, likes FROM stream WHERE source_id = AND likes.user_likes = 1 limit 50&access_token=

The same applies to the above.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜