Facebook FQL `like` table retuns max 100 rows?

心不动则不痛 提交于 2019-12-10 20:14:47

问题


OK, so the title mainly says it all. I want to get the number of likes that I gave to people, for which I am doing a query like:

SELECT object_id FROM like WHERE user_id = me()

However, for large accounts, this always returns 100, even if I add LIMIT 1000 at the end of the query. If I make the limit lower than 100 (eg. 50), it will only show 50 results, so LIMIT works...

Is anyone aware of a limitation that Facebook imposes on the number of returned results in this table? I am mainly waiting for some Facebook engineers to help me with this, but if someone has encountered this issue, feel free to help me out.

EDIT: if I make the following query, it returns 1000 rows, but this query is useless, since I want to get all likes that I gave, not that a object received.

SELECT user_id FROM like WHERE object_id="10150146071791729" LIMIT 1000 // taken from a FQL example page

回答1:


For anyone who may stumble upon this. Facebook apparently lets you only get 100 likes and so on. It's either a bug or not documented. I've filed a bug report with them.




回答2:


You could try this:

SELECT object_id FROM like WHERE user_id = me() LIMIT 0,100
SELECT object_id FROM like WHERE user_id = me() LIMIT 100,100
SELECT object_id FROM like WHERE user_id = me() LIMIT 200,100
SELECT object_id FROM like WHERE user_id = me() LIMIT 300,100
... and so on



回答3:


You can get Like count at first & then set LIMIT according to the count




回答4:


It seems like this issue is still open - create a new bug under: https://developers.facebook.com/bugs/865607590127107/



来源:https://stackoverflow.com/questions/9581243/facebook-fql-like-table-retuns-max-100-rows

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