Get all of a user's likes (all of them) with FQL

一曲冷凌霜 提交于 2019-11-28 06:02:55
DMCS

I've been able to use FQL to get at some, but not all, of the stream likes. See: http://facebook.stackoverflow.com/questions/8496980/fql-like-table-not-returning-any-results

The queries I've got are:

1) Gives me stream items I've liked on page feeds:

 SELECT post_id, source_id, message 
   FROM stream 
  WHERE source_id 
     IN (SELECT target_id FROM connection WHERE source_id=me() and is_following=1) 
    AND likes.user_likes=1 
  LIMIT 10

2) Gives me stream items I've liked from my feed that I myself posted:

 SELECT post_id, source_id, message 
   FROM stream 
  WHERE source_id=me() 
    AND likes.user_likes=1 
  LIMIT 10

What's annoying is I cannot get user likes from stream items for Event stream items, Friend stream item, Group stream items, etc. Even though I have every permissions accepted for that user. It's not like I'm asking for secret information. As a matter of course, the user can like and remove likes of stream items via my app. It's just that I cannot query a complete list of the current stream items that have been liked by the user.

Sorry, you cannot pull all of the likes of a person using the /likes endpoint. We limit it to anything that has a FB page, which is any open graph object, sans articles. For example, if you like an open graph object that has an og:type of article, we don't return that in the graph api likes endpoint.

Try this FQL query:

SELECT user_id, object_id, post_id, object_type 
FROM like 
WHERE user_id = me()
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!