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.
- 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” ).
- 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.
- 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.
- 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.
- 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.