Graphic parameter facebook graph api

I am writing an application that should retrieve all messages on any facebook page. For the McDonald page, I would use this url:

https://graph.facebook.com/McDonalds/posts?access_token=xxx&limit=5000

The problem is that, firstly, I do not receive messages older than 2011-11-01, and the number of messages displayed is much less than 5000. This means that the limit parameter does not work correctly. I looked at it and found that it was a known bug.

Then I tried to follow the next and previous swap information provided at the end, and even using this, I can not get through 2011-01-24. After the next link, a blank page appears 2 times. The McDonalds page is much older and contains more posts. So the question is how, in my opinion, should I receive old messages. Is there any workaround?

+3
source share
1 answer

There is a limit on the limit. Try using with and until the date options are extended

https://graph.facebook.com/McDonalds/posts?access_token=xxx&limit=5000&since=2+years+ago&until=now

&limit=5000&since=2+years+ago&until=now
&limit=5000&since=3+years+ago&until=now
0
source

All Articles