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

Social Media 201

Social Media 201Starting October 13, Social Media 201 picks up where Social Media 101 left off, to provide you with hands-on instruction for gaining likes, followers, retweets, favorites, pins, and engagement. Social media experts will teach you how to make social media marketing work for your bottom line and achieving your business goals. Register now!