Paging through a List of Connected Objects
Sometimes Facebook has more objects returned than can fit on a single page of returned items. Facebook uses a technique called paging to let you page through each page of the full set of data.
Why does Facebook need to page data? Why can't it just return all the elements of the returned data in a single page? Having to page through data can add queries and time to your application. Unfortunately, it's one of the necessary steps to get a full set of data if you're looking at large sets of data. One example where you might want to page through data is a user's news feed. For many users, this can be tens of thousands of rows returned. That means memory consumed by your browser, which can often mean slowing your server down (or the user's browser if you're using JavaScript). It also means more bandwidth and processing time required by Facebook. The fact is, most queries just don't require the capability to pull the full set of data about connected objects. This is why Facebook implements paging.
You can get around this, however. FQL is one way, and you can try to make a query with FQL if for some reason you need to get at the full set of data in one query. Use at your own risk though, because with large sets of data, you're going to run into huge memory and processing problems, not to mention bandwidth going to and from Facebook!
If paging ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access