Back to News for Developers

Upgrade to API v2.0 without making code changes

February 5, 2015ByDan Xu

Today, we're announcing a new tool to help you upgrade to Graph API v2.0 without making any code changes.

At last year's F8, we announced Graph API v2.0 and the new Facebook Login. On April 30, 2015, all apps will automatically be upgraded to Graph API v2.0 and the new Login, so we're focused on adding tools and features to make it easier to upgrade your apps before then.

Last December, we added the ability for you to use Test Users to see how your app will behave against Graph API v2.x without having to update your code. Many of you tested your apps, and gave us the feedback that you'd like a simple way to take the next step: to upgrade without having to write code and redeploy. Now, we are launching a button that allows your app to use Graph API v2.0 by default.

To make the change, go to the Migration tab of your app's Settings page. You can switch the “Use Graph API v2.0 by default” setting to ON (or OFF to revert your app back to its original state).

Here's what will happen after you enable this migration:

  1. People who log into your app will see the new Facebook Login dialog which gives them greater control over what information they share. This means people will be able to decline to grant one or more of the permissions you're requesting.
  2. Only the permissions which remain available in v2.0 will be shown in the login dialog and be useable when making API calls: e.g. the friends_birthday permission will not be grantable, and API calls which use this permission may return empty arrays.
  3. People logging into your app for the first time will be known by an app-scoped user ID. Note that if you enable and then later disable this migration, people who first logged into your app while the migration was enabled will still be known by the same app-scoped ID after the migration is disabled.
  4. Calls to /me/friends will return the user's friends who also use the app.

This is the same set of changes which will come into effect for all apps on April 30, 2015. For the full list of changes, please see the changelog.

If your app relies on some of the features which have changed or been deprecated in v2.0, we suggest you do not enable your migration using this new tool, and instead manually update your app to call Graph API v2.0 or above. With the migration date only a few weeks away, we advise you to begin making these changes now. For more information on how to upgrade to v2.0, please see the upgrade guide.

But if your app is already able to handle these changes, or if you're not using features which have changed, you can now instantly upgrade your app with the flick of a switch.

We hope this makes it easier to upgrade some of your apps to Graph API v2.0 and the new Facebook Login.