Graph API v2.1 Upgrade Notice

Alan – i’ve been using the 4.5.0 source that is part of the enterprise distribution.  My understanding was that there were some tweaks but I’ve never seen anything specific about what.

There’s no need to copy anything, you can just make it a dependency in gradle.  I posted the steps in the Enterprise forum.

I have the same notice from facebook. I also released in March with build 2016.2830.  What is exactly the issue? should i rebuild the game with a daily build?

We are still investigating.

I’ve just double checked and the version that is being pulled into my project through Gradle is 3.23.1. Since Simone Valenti says that 3.20 supports Graph 2.2, I assume my projects are in fact calling 2.2 as well, and the warning messages are from older builds which users have not updated.

I’ll take a look at nandgate’s suggestion about updating to v4, however myself and others have been experiencing problems with the v4 plugin.

Hi everyone,

Looks like there’s lots of lingering questions in this thread, so I’ll do what I can to address most (if not all) of them.

  1. Why did I get a warning about upgrading to Graph API v2.1?

If you haven’t seen it already, here’s the bug report to Facebook on the issue: https://developers.facebook.com/bugs/1634445133540643/

Here’s the important part:

  • “If your app’s minimum API version is v2.1 or above (you can verify this in the app settings “Dashboard” page), you don’t need to do anything, and you can ignore this alert. If your app’s minimum API version is v2.0, we recommend that you vet your app’s code and look for Platform Integrations (API calls) that explicitly use v2.0. You can then proceed to upgrade those. If you are certain that you are not using v2.0, you can also ignore this alert.”

As Rob mentioned, Facebook-v4 uses Graph API endpoints higher than version 2.0. Moreover, Facebook SDK version 4 and Graph API version 2.3 were introduced at the same time per this blog post, meaning that anyone using the Facebook-v4 plugin at any point would be making calls to Graph API version 2.3 at the earliest.

The following comments are assuming you haven’t attempted to manually override what version of the Graph API you’re calling by doing something like facebook.request( “v2.0/other/graph/path/stuff” ):

  • All that being said, if you’re using the Facebook-v4 plugin , you can  ignore the message.
  • Similarly, if you’re using the legacy Facebook plugin , but your app’s minimum API version is v2.1 or greater , you can  ignore the message.
  • If you’re using the legacy Facebook plugin , but your app’s minimum API version is lower than v2.1 , you should upgrade your app to at least use the latest version of the legacy Facebook plugin, which will convert your Graph API calls to target version 2.1.

Lastly, if you have attempted to manually override the Graph API version being used, those calls should be upgraded to at least version 2.1, i.e. facebook.request( “v2.1/other/graph/path/stuff” ).

  1. Is Corona’s version of the Facebook SDK altered in a way where it must be used for Enterprise users wanting Facebook-v4?

On iOS , we currently don’t have any modifications to the Facebook SDK such that you must use the version we distribute with Corona Enterprise.

On Android , there are modifications, but whether you need to use this version depends on what you’re doing with the plugin and what API Levels you want to target. The two biggest modifications we’ve made are:

  • Porting in the Facebook Places and Facebook friends dialogs.
  • Restoring support for API Levels 10-14.

For Enterprise users, this means that you  must use our forked Facebook SDK for Android for the following:

  • Making calls to facebook.showDialog( “place” ) or facebook.showDialog( “friends” )
  • Having your app run on Android 2.3.3 - 4.0.2.
  1. Where in the facebook_sdk.jar file can I find version info?
  • The Facebook SDK version number is in the com.facebook.FacebookSdkVersion.class file. It should be the public static final String BUILD constant.
  • The Graph API version number is in the com.facebook.internal.ServerProtocol.class file. It should be the public static final String GRAPH_API_VERSION constant.
  1. How do I integrate Facebook-v4 using Android Studio?

nandgate’s instructions posted here are on par with improvements we’re making to the process. One change I’d recommended is to target SDK version 23 instead of 21, since the Corona core targets version 23.

While this is still a work in progress, anyone who is interested can try integrating our forked Facebook SDK available on GitHub.

  1. Why are there so many issues with the Facebook-v4 plugin?

A lot of this comes down to manpower. Facebook can make changes faster than we can keep up with them. Many of the recent Facebook-v4 developments (outside of investigating bugs) have been aimed at making maintenance of the plugin easier for everyone. Transitioning our Facebook SDK fork for Android over to GitHub is a part of this process.