3

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
Eduard Luca
  • 6,514
  • 16
  • 85
  • 137

4 Answers4

4

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.

Eduard Luca
  • 6,514
  • 16
  • 85
  • 137
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
Joakim Syk
  • 1,021
  • 6
  • 6
  • Forgot to mention I already tried that, and unfortunately only the first query brings back 100 results, then the next ones are empty. Seems like FB really doesn't want us to get more than 100 likes from this table... – Eduard Luca Mar 06 '12 at 10:29
0

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

0

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

Pooya Estakhri
  • 1,129
  • 1
  • 11
  • 25