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

Content Marketing 101

Content Marketing 101Almost 60% of businesses use some form of content marketing. Starting December 8, get hands-on content marketing training in our online boot camp! Through an interactive series of webcasts, content and marketing experts will teach you how to create, distribute, and measure the success of your brand's content. Sign-up before November 10 to get $50 OFF with early bird pricing. Register now!