AIRFacebook has been updated to version 2.0.0
which brings new, reworked ActionScript API and updated Facebook SDKs to version 4.30.0
for both iOS and Android. See below to learn what changes you need to make in order to use this new version of the extension.
Recommended AIR SDK
The Facebook SDK for iOS contains references to iOS 11 APIs, thus you will need to package your IPA with iOS 11 SDK. This can be easily achieved by using AIR SDK 28 or newer. To use older AIR version, provide a path to iOS 11 SDK using the -platformsdk
option when packaging your IPA.
When using AIR 24 or older, you will need to modify your AIR SDK installation as described in the release notes for AIRFacebook v1.5.0.
Automatic event logging
If you want to disable auto-logging made by the Facebook SDK, add the following information to your app descriptor.
For iOS:
For Android:
ActionScript API changes
init() method
The signature of the init()
method has changed. The parameters autoLogAppActivation
, showLogs
and urlSchemeSuffix
have been removed. You can optionally set these values using the settings
getter, but you must do so before calling the init()
method in order for the values to take effect:
Sharing links
Sharing link APIs no longer support custom title and description.
App invites
The app invites feature has been deprecated by Facebook.
Below is an overview of all changes made to the ActionScript API.
Initialization, login
Old API | New API |
---|---|
AIRFacebook.init()
|
AIRFacebook.instance.init()
|
AIRFacebook.logout()
|
AIRFacebook.instance.logout()
|
AIRFacebook.loginWithReadPermissions()
|
AIRFacebook.instance.loginWithReadPermissions()
|
AIRFacebook.loginWithPublishPermissions()
|
AIRFacebook.instance.loginWithPublishPermissions()
|
AIRFacebook.instance
object to receive events related to these APIs.
Open Graph
Old API | New API |
---|---|
AIRFacebook.sendOpenGraphGETRequest()
|
AIRFacebook.instance.openGraph.sendGETRequest()
|
AIRFacebook.sendOpenGraphPOSTRequest()
|
AIRFacebook.instance.openGraph.sendPOSTRequest()
|
AIRFacebook.sendOpenGraphDELETERequest()
|
AIRFacebook.instance.openGraph.sendDELETERequest()
|
AIRFacebook.postAchievement()
|
AIRFacebook.instance.openGraph.postAchievement()
|
AIRFacebook.postScore()
|
AIRFacebook.instance.openGraph.postScore()
|
AIRFacebook.requestScores()
|
AIRFacebook.instance.openGraph.requestScores()
|
AIRFacebook.instance.openGraph
object to receive events related to these APIs.
Sharing
Old API | New API |
---|---|
AIRFacebook.shareLink()
|
AIRFacebook.instance.share.link()
|
AIRFacebook.sharePhoto()
|
AIRFacebook.instance.share.photo()
|
AIRFacebook.shareLinkMessage()
|
AIRFacebook.instance.share.linkMessage()
|
AIRFacebook.sharePhotoMessage()
|
AIRFacebook.instance.share.photoMessage()
|
AIRFacebook.shareOpenGraphStory()
|
AIRFacebook.instance.share.openGraphStory()
|
AIRFacebook.showAppInviteDialog()
|
AIRFacebook.instance.share.appInvite()
|
AIRFacebook.canShareLink
|
AIRFacebook.instance.share.canShareLink
|
AIRFacebook.canSharePhoto
|
AIRFacebook.instance.share.canSharePhoto
|
AIRFacebook.canShareLinkMessage
|
AIRFacebook.instance.share.canShareLinkMessage
|
AIRFacebook.canSharePhotoMessage
|
AIRFacebook.instance.share.canSharePhotoMessage
|
AIRFacebook.canShareOpenGraphStory
|
AIRFacebook.instance.share.canShareOpenGraphStory
|
AIRFacebook.canShowAppInviteDialog
|
AIRFacebook.instance.share.canShareAppInvite
|
AIRFacebook.instance.share
object to receive events related to these APIs.
Game requests
Old API | New API |
---|---|
AIRFacebook.showGameRequestDialog()
|
AIRFacebook.instance.gameRequests.showDialog()
|
AIRFacebook.canShowGameRequestDialog
|
AIRFacebook.instance.gameRequests.canShowDialog()
|
AIRFacebook.requestUserGameRequests()
|
AIRFacebook.instance.gameRequests. loadUserGameRequests()
|
AIRFacebook.deleteGameRequest()
|
AIRFacebook.instance.gameRequests.deleteGameRequest()
|
AIRFacebook.addGameRequestInvokeListener()
|
AIRFacebook.instance.gameRequests. addGameRequestInvokeListener()
|
AIRFacebook.removeGameRequestInvokeListener()
|
AIRFacebook.instance.gameRequests. removeGameRequestInvokeListener()
|
AIRFacebook.instance.gameRequests
object to receive events related to these APIs.
Permissions
Old API | New API |
---|---|
AIRFacebook.grantedPermissions
|
AIRFacebook.instance.grantedPermissions
|
AIRFacebook.deniedPermissions
|
AIRFacebook.instance.deniedPermissions
|
AIRFacebook.isPermissionGranted()
|
AIRFacebook.instance.isPermissionGranted()
|
Misc
Old API | New API |
---|---|
AIRFacebook.addBasicUserProfileListener()
|
AIRFacebook.instance.addBasicUserProfileListener()
|
AIRFacebook.removeBasicUserProfileListener()
|
AIRFacebook.instance.removeBasicUserProfileListener()
|
AIRFacebook.requestUserProfilePicture()
|
AIRFacebook.instance.requestUserProfilePicture()
|
AIRFacebook.requestExtendedUserProfile()
|
AIRFacebook.instance.requestExtendedUserProfile()
|
AIRFacebook.requestUserFriends()
|
AIRFacebook.instance.requestUserFriends()
|
AIRFacebook.logEvent()
|
AIRFacebook.instance.logEvent()
|
AIRFacebook.fetchDeferredAppLink()
|
AIRFacebook.instance.fetchDeferredAppLink()
|
AIRFacebook.dispose()
|
AIRFacebook.instance.dispose()
|
AIRFacebook.sdkVersion
|
AIRFacebook.instance.sdkVersion
|
AIRFacebook.version
|
AIRFacebook.VERSION
|
AIRFacebook.isSupported
|
AIRFacebook.instance.isSupported
|
AIRFacebook.isInitialized
|
AIRFacebook.instance.isInitialized
|
AIRFacebook.isUserLoggedIn
|
AIRFacebook.instance.isUserLoggedIn
|
AIRFacebook.basicUserProfile
|
AIRFacebook.instance.basicUserProfile
|
AIRFacebook.isBasicUserProfileReady
|
AIRFacebook.instance.isBasicUserProfileReady
|
AIRFacebook.accessToken
|
AIRFacebook.instance.accessToken
|
AIRFacebook.accessTokenExpirationTimestamp
|
AIRFacebook.instance.accessTokenExpirationTimestamp
|
AIRFacebook.isAccessTokenExpired
|
AIRFacebook.instance.isAccessTokenExpired
|
AIRFacebook.instance
object to receive events related to these APIs.