Facebook Brings Pagination And Serveral Other Improvements To It’s Graph API

Facebook has just announced several improvements to the Graph API, which make it easier and faster to access data from the social graph. Here’s a summary of the updates:

Field expansion

Field expansion significantly improves performance for API calls and reduces your coding effort for retrieving data from the social graph. You can now make advanced Graph API queries to get the exact data you need, in fewer API calls. You can also create nested queries, similar to what you can do with FQL multi-queries. The call response maintains data hierarchy, so you don’t have to post-process the data either.

As an example, you can request read properties from a user’s first K albums and retrieve the first N photos in each album with one API call.

To get started, check out the documentation for field expansion.

Graph API Explorer with field expansion

To better understand the field expansion functionality, try playing around with node and edge schemas in the Graph API Explorer.


Pagination

For selected edges, Facebook has introduced cursor-based offset paging. This improvement definitively indicates when you’ve reached the end or beginning of a data set. We’ll no longer show the ‘previous’ or ‘next’ paging links when there’s no new data. This translates to faster request processing times, saving you one round-trip every time you page through an entire collection.

Learn more about pagination.

Leave us your comments…


Samir Saleem

An innovative and dynamic marketing expert having worked for both local and multinational organisations,having expertise in leading diverse assignments on devising digital/social media marketing strategies, promotions, public relations and business development. As an experienced social media strategist and business analyst, he manages several brands via his 2nd Startup Hybrid Signals (www.hybridsignals.com) Samir is an award winning technology and social media blogger and can be reached at samzbest@gmail.com

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *