I'm running a contest where I count up all the daily comments on a webpage per unique commenter each day. At the end of the month, the person with the most comment-votes wins. I have logic written for this that worked perfectly ... until today.
When a page has more than 900 or so comments, the vote-counter stops going up. I figured this had to do with pagination, so I altered my FQL query to use LIMIT and OFFSET to parse 100 comments at a time and combine the results for my vote-counting function, but when running my queries (even by hand, putting the https://graph.facebook.com/comments url in the address bar) it craps out somewhere between 500 and 600 comments, so the last 400 or so comments on the webpage never even return!
Since this method is failing is there a more reliable way to get the comment data?
UPDATE: I'm supplying some code, but I've found the same problems persist in FQL as in the Graph API. Here's my graph API call:
https://graph.facebook.com/comments/?ids=http://www.burlesquebitch.com/article.php?id=538&limit=500
If you crank the limit to over ~600 where more than 900 comments exist (or add an offset that would put the results past that range) it begins to fail. The earlier comments disappear. When I count up the results they're somewhere between 500-600.
https://graph.facebook.com/comments/?ids=http://www.burlesquebitch.com/article.php?id=538&limit=1000
Then I finally got fql working:
$fql_query_result = file_get_contents("https://graph.facebook.com/fql?q=SELECT+object_id,+id,+text,+time+,+fromid+FROM+comment+WHERE+object_id='366760226746431'+LIMIT+1000");
$data = json_decode($fql_query_result,true);
It also fails, but more like around 800-900. In any case the bad behavior is the same. I even did some experiments where I limited the query by time hoping that by isolated my results to a date range I would keep myself within it's failing threshold:
$fql_query_result = file_get_contents("https://graph.facebook.com/fql?q=SELECT+object_id,+id,+text,+time,+fromid+FROM+comment+WHERE+object_id='366760226746431'+AND+time>1365984000+AND+time<1366416000+LIMIT+500");
$data = json_decode($fql_query_result,true);
But no dice. If I flip the < to > in my time comparison the entire query fails and returns nothing. Idealy I would want to get the paging information, as suggested in the answer below, but I can't SELECT it in my query... if I try and get anything that ends in _cursor the query returns empty.
I am forced to conclude that whatever horrendous bug lives in the Graph API code its extended into the FQL code as well. I know of no other way to get data from a facebook object this size.