Facebook Updates Graph API To Make Data More Accessible To Developers

Developers were pleased with Thursday’s improvements to Facebook’s Graph API, which allows them to access data in the social graph quicker and easier. Facebook updated field expansion and made a tweak to pagination.

Facebook software engineer Harshdeep Singh announced the changes in the site’s developers blog:

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.

Facebook also made pagination a little easier by introducing cursor-based offset paging for select pages. This indicates when a developer has reached the end or beginning of a data set. The site will no longer show “previous,” or “next,” links when there is no new data. Singh wrote that Facebook is still examining ways to improve pagination.

Readers: If you’re a developer, how will these changes help?

Related Stories
Mediabistro Course

Instagram Marketing

Instagram MarketingStarting October 27, learn how to gain likes and followers on one of the most popular social media platforms! In this course, you'll learn how to develop an Instagram strategy that will make your profile stand out and gain new followers, tell your brand's story through photos, and use your profile to drive your sales and business objectives. Register now!