Facebook Graph API V2.0 Tools Ease Dev Transition

Facebook recently made a new tool available to developers that it hopes will kickstart the migration from Graph API version 1 (v1) to Graph API version 2 (v2). The tool lets developers see how things will behave in the v2 environment before they actually make the switch and publish their updated app. 

Facebook announced Graph API version 2 at its F8 developer conference earlier this year. The company says a significant number of apps have already made the jump from Graph API v1 to Graph API v2 (some have even implemented v2.2). However, many apps remain on the older API. Facebook will deprecate the API on April 30, 2015 — meaning apps that haven’t updated to the newer version will be forced to use Graph API v2 anyway. It’s time to update your API version.

Facebook contends the switch should be relatively painless for some developers. For example, Facebook believes a simple code change to ensure API requests declare v2 or greater is all that’s necessary. However, Facebook says developers have asked for better testing tools for Graph API v2. To facilitate that, Facebook will allow developers to see how their apps behave once updated to Graph API v2 — all without updating a single line of code.

To do this, Facebook said it added the ability to override the applied API version for test users. This permits test users to see exactly how the app behaves once they’ve migrated to  v2 or higher. The process is rather simple: developers simply load the “Test Users” tab in the role section of the dashboard and then select “Override the API version in Graph API requests for this test user.” Developers then select which version of the API they want to test the app against. After developers take these steps, they’ll see exactly how the app works for any version of the Graph API (not just v2). 

Facebook offers at least one warning. It says the override control only works for requests made using the access tokens of specific users. In other words, it can only be tested from one account or user, and not across multiple users. Developers who want to see how every aspect of their app behaves once upgraded to v2 need to update their code to call v2 across all API requests. 

Apps that aren’t updated before the April 30 cutoff date will only be able to call Graph API version 2.0. Facebook worries apps that aren’t properly tested ahead of time may offer “broken experiences” to end users. Facebook would like to avoid that if at all possible. The newest versions of the Graph API include features such as the Tagged Places API, the Social Context API, and Page Mentions.

More information is available from Facebook’s update guide, which you can find here

Be sure to read the next Social article: Migrate to Facebook Graph API V2 With a Push of a Button


Comments (0)