Time for action – obtaining data in pages

Using limit and offset together, we should be able to obtain specific pages of posts from the Facebook Page's feed. So, if we load this URL in a browser:

https://graph.facebook.com/facebook/feed?offset=300&limit=25

We should be able to see the 301st – 325th posts in the feed. Try it out. The result at the time of writing is as follows:

{
   "data": [

   ]
}

Wait, what?

What just happened?

The Graph API puts limitations on what can be retrieved from a User's or Page's stream and status updates (which includes their feed connection). The official documentation says that these connections are limited to the last 30 days or 50 posts, whichever is greater.

That's not the only problem with the limit-offset parameters.

Get Facebook Graph API Development with Flash now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.