Facebook FQL `like` table retuns max 100 rows?

2019-07-02 04:05发布

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

4条回答
唯我独甜
2楼-- · 2019-07-02 04:27

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楼-- · 2019-07-02 04:39

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

查看更多
聊天终结者
4楼-- · 2019-07-02 04:51

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

查看更多
神经病院院长
5楼-- · 2019-07-02 04:53

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.

查看更多
登录 后发表回答