The following is an overview of the differences between major versions of the Facebook SDK implemented via the Facebook plugin. Some of these updates will be delivered automatically when a new device build is made, while others may require updating to a later version of Corona. Bug fixes will typically only be delivered to the latest major version available.
Release Name | Release Date | Corona Compatibility | Graph API | Available | |
---|---|---|---|---|---|
Android Beta | 07/24/2015 | 2015.2685 - 2016.2827 | – / 4.4.0 (fork) | v2.4 | |
iOS Beta | 09/01/2015 | 2015.2685 - 2016.2827 | 4.5.1 / 4.5.0 (fork) | v2.4 | |
11/2015 Update | 11/10/2015 | 2015.2685 - 2016.2827 | 4.5.1 / 4.5.0 (fork) | v2.4 | ✓ |
3/2016 Update | 03/25/2016 | 2015.2828 - 2016.2931 | 4.10.1 / 4.10.1 (fork) | v2.5 | ✓ |
Stable Release | 10/27/2016 | 2016.2932 + | 4.16.1 / 4.16.1 (fork) | v2.8 | ✓ |
The Graph API version has been updated from v2.5 to v2.8. See Facebook's Graph API Upgrade Guide for more information on how this may affect your facebook.request() calls.
Previously denied permissions will be
Facebook Places and Facebook Friends have been deprecated in favor of selecting these in the Share Dialog. Please migrate to using facebook.showDialog( "link" )
facebook.showDialog( "feed" )
facebook.showDialog( "place" )
facebook.showDialog( "friends" )
facebook.showDialog( "link" )
now requires a link
key in the params
table. This means that using the Share Dialog to let users compose a
The Facebook SDK is no longer distributed with Corona Enterprise in the Plugins/sdk-facebook
directory. For iOS, the appropriate SDK version can be downloaded here. For Android, Corona's fork of the Facebook SDK is now provided on GitHub.
A new method, facebook.isFacebookAppEnabled(), will help determine if a native Facebook app is installed and accessible on the device. See the documentation for more info.
facebook.showDialog() now supports sharing photos to a user's photo album.
For iOS, the Facebook SDK version has been updated from 4.10.1 to 4.16.1 which supports iOS 10. If you're a Corona Enterprise user, see Facebook's upgrade guide for more information.
On iOS 9 and above, the Share Dialog will use a SFSafariViewController. This is to coincide with the default that began with Facebook SDK 4.6.0.
For Android, the Facebook SDK version has been updated from 4.10.1 to 4.16.1. This means that the Facebook Lite app will be used for login if the Facebook app for Android is not installed. If you're a Corona Enterprise user, see Facebook's upgrade guide for more information.
The Graph API version has been updated from v2.4 to v2.5. See Facebook's Graph API Upgrade Guide for more information on how this may affect your facebook.request() calls.
For iOS, the Facebook SDK version has been updated from 4.5.1 to 4.10.1. This means that devices running iOS 9 and above will use a SFSafariViewController to log users in. If you're a Corona Enterprise user, see Facebook's upgrade guide for more info.
For Android, the Facebook SDK version has been updated from 4.5.0 to 4.10.1. This means that the target Android SDK version is now API Level 23. If you're a Corona Enterprise user, see Facebook's upgrade guide for more information.
For Android, support for API Levels 10-14 has been maintained despite the Facebook SDK changing the minimum SDK version to API Level 15.
On Android, Facebook Places will now prompt users for Location permission if it hasn't been granted on devices running Android 6.0 and above.
For facebook.request(), DELETE
is now supported as an httpMethod
parameter. facebook.request() can also now be used to post Open Graph stories.
For facebook.showDialog(), the Game Request Dialog now supports the actionType
and filter
parameters.
The property facebook.currentAccessToken has been deprecated in favor of the facebook.getCurrentAccessToken() function.
facebook.showDialog( "link" )
has been added in favor of facebook.showDialog( "feed" )
For Android, the Facebook SDK version has been updated from 4.4.0 to 4.5.0. See Facebook's upgrade guide for more information.
If you have an older project which used Corona's legacy Facebook plugin, you'll need to migrate to the current Facebook plugin. The following is an overview of the differences between Facebook SDK v3 and Facebook SDK v4, now fully implemented via the Facebook plugin.
The updated project settings for the current plugin can be found here.
facebook.getCurrentAccessToken() — This indicates the access token corresponding to which user logged in to Facebook from your app. This can be used to determine if a user is already logged in when the app starts, know when to refresh an access token, and track which permissions need to be requested.
facebook.isActive — This property lets you know if the facebook-v4
require()
the plugin in your project, but it isn't guaranteed to be completed at the time when the next line of code executes.
facebook.setFBConnectListener() — This function lets you set the fbconnect event listener which the facebook-v4
There are new actions available to facebook.showDialog() which have the
facebook.accessDenied
— Since logging in through Settings on an iOS device is not supported, this API no longer serves a purpose.To include the current Facebook plugin, use require( "plugin.facebook.v4" )
require( "facebook" )
Implementation for iOS 9 and above requires a few additional steps detailed in the
If you're using Corona Enterprise for iOS, you'll need to add a reference to the CoronaFacebookDelegate
in your Info.plist
as outlined in the
On Android, you must now include a Facebook App ID in build.settings
. Previously, you also needed to specify the android.permission.INTERNET
permission in build.settings
, but this has been built into the plugin for Corona SDK users. Enterprise users, however, will still need to add the android.permission.INTERNET
permission to their AndroidManifest.xml
.
Passing your Facebook App ID as the first argument to facebook.login() and facebook.publishInstall() is no longer necessary. Doing so will result in a warning advising you to remove the argument.
Passing a listener function reference to facebook.login() is now optional. The listener function for fbconnect events can be set independently of facebook.login() via the facebook.setFBConnectListener() API.
facebook.showDialog() is more limited on combinations of valid options. This is due to the new sharing model introduced in Facebook SDK v4. Currently, only dialog types that are explicitly documented are supported.
The "apprequests"
action for facebook.showDialog() has been replaced by "requests"
which corresponds to the Game Requests Dialog.
The URI responses given from facebook.showDialog() will be different as a result of the new sharing model. For example, a "link"
action will return only the ID of the post made, while a "requests"
action will return the request ID and the list of recipients in the request.
facebook.showDialog() now provides feedback if the user cancelled out of the dialog. If the dialog is cancelled, the fbconnect event will have contain this indication in its response.
On Corona Enterprise for Android, the facebook-v4