Sign up ×

I'm trying to fetch all comments for a particular Facebook post via the FB Graph API.

The call for the post itself:|XXXXXXXXXXXXXXXXXXXXXXXXXXX

yields that there are 5278 comments.

Querying for the comments with offset=900, limit=100:|XXXXXXXXXXXXXXXXXXXXXXXXXXX&__after_id=129047777209815_279367092177882_1122143


"paging": { "next": "|XXXXXXXXXXXXXXXXXXXXXXXXXXX&__after_id=129047777209815_279367092177882_1122270"}

Yet querying|XXXXXXXXXXXXXXXXXXXXXXXXXXX&__after_id=129047777209815_279367092177882_1122270

doesn't give me any comments at all. It's not just this post, I've noticed consistently that I can never retrieve more than 999 comments. Can anyone tell me how to get more than 999 comments? Is this a Facebook limit? I can't find it in the docs.

Thanks, Paul

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Why are you using the __after_id token? The following seems to work perfectly in the Graph API Explorer.


The above retrieves the 5278th comment.

Graph API Explorer Link

The limit of 999 might apply to the __after_id parameter. It doesn't seem to be well-documented. (Related Bug)

share|improve this answer
Many thanks for the quick reply. The problem appears to be access token related; when I use an access token generated by the Graph API Explorer everything works correctly. Before I was generating a client_credentials access token (using {"grant_type": "client_credentials", "client_id": <APP_ID>, "client_secret": <APP_SECRET_ID>}) and this was restricting me to 1000 comments? In any case pointing me to the explorer solved the issue, thanks. –  Paul Lawson Aug 1 '12 at 10:57
Glad to help :) –  Anirudh Ramanathan Aug 1 '12 at 10:58

Your Answer


