With Facebook’s upgrade to Graph API 2.0 and deprecation of Graph API 1.0 set for April 30, the social network announced the release of a tool to allow developers to preview how their applications will perform after upgrading.
Facebook’s Dan Xu offered an overview of how developers should proceed leading up to April 30 in a post on the social network’s developer blog:
At F8 2014, we announced v2.0 of the Graph API, and as a result, we will be deprecating v1.0 on April 30, 2015.
When you prepare to upgrade, your first step is to see how your app behaves when it’s updated to v2.x. For some developers, this is as simple as a code change to ensure that their API requests declare v2.0 or greater. But we’ve heard feedback that it’d be valuable to test how an app behaves in v2.x without making any code changes on your side.
To make this easier, we’ve added the ability to override the applied API version for test users of your app. This allows you to log in as a test user and see exactly how your app will behave once you’ve migrated to v2.x.
To setup a version override for a test user, visit the Test Users tab in the roles section of your app’s dashboard and select “Override the API version in Graph API requests for this test user (pictured above).”
Next, choose the version that you want applied to all API requests from this test user:
Once you enable this setting, when you make requests with this user’s access token, they’ll behave as if you’re calling the version you selected.
One additional thing to note is that this override control only works for requests made using this specific user’s access token. Requests made with other users’ tokens, or made with your app token, will behave as normal. If you want to test how your app behaves in its entirety when upgraded to v2.x, you should update your code to call v2.x across all your API requests.
A quick reminder that on April 30, 2015, all API calls that don’t specify version v2.0 or greater will automatically behave like v2.0 calls. Please update your code and release an upgraded version before April 30to avoid people encountering broken experiences when they use your app.
The ability to override the version for test users should make it even easier for you to upgrade your apps to Graph API v2.x.
For more information on how to upgrade to v2.x, please see the upgrade guide.
Developers: Are you ready?