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 = 0What 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.
精彩评论