Changelog and release notes for the Facebook SDK for Android.
For the changelogs for 5.0.0 and later, see facebook/facebook-android-sdk/CHANGELOG.md on GitHub.
Deprecated classes: FacebookUninstallTracker
Support for Android Autofill (a new feature released with Android Oreo)
New Messenger Sharing SDK features: Blog post
No changes.
No changes.
title, description, caption and image field of FBSDKShareLinkContent have been deprecated. Please take appropriate action to remove usage of them.LoginType from being required as part of the SkinManager and AdvancedUiManagerAppLoginTheme if using skinsNo changes.
No changes.
No changes.
No changes.
AudienceNetworkActivity is no longer required in the Android Manifest.onAdClickedListener not firing for Native Ad carousel children.FBInstreamAdViewFBAdChoicesView expandable animation for UIRectCornerTopRight and UIRectCornerBottomRightsetUserID and updateUserProperties to FBAppEventsLogger. See here for more details.SQLiteDatabaseLockedExceptionCUSTOM_TAB to CHROME_CUSTOM_TABAppLinkData.ARGUMENTS_TAPTIME_KEYAppEventsLogger.setPushNotificationsRegistrationId and AppEventsLogger.logPush*. See Push Notifications for more details.ShareHashtag to support sharing hash tags. See Sharing on Android for more details.ShareMediaContent to support sharing mixed content (e.g., photos and videos). See Sharing on Android for more details.ShareLinkContent.Builder.setQuote to support sharing quotes from a link. See Sharing on Android for more details.AppInviteContent.setPromotionDetails and AppLinkData.getPromotionCode to make it easy to include a promotion code with the app invite. See App Invites for more details.AppEventsLogger.activateApp(Application) to greatly simplify using Facebook Analytics. Call this method from your Application's onCreate instead of inside each Activity. See App Events for more details.DeviceLoginButton for device flow authentication with the ability to set a redirect URI.DeviceLoginManager for device flow authentication with the ability to set a redirect URI.No changes
NOTE: Facebook has identified a impression logging bug in the Audience Network jar version 4.6 for Android which can lead to lower impressions and revenue. It is fixed in version 4.7 and we highly recommend updating to that version.
No Changes
There are breaking changes in this release. See the upgrade guide for details. Upgrading the Android SDK from 4.0.1 to 4.1.0.
The Facebook SDK for Android v4.0 is a major version upgrade which features:
This describes the major differences between v3.x and v4.0 of the SDK. For details on upgrading, see Upgrading the Android SDK from 3.x to 4.x.
Login:
LoginManager and AccessToken - These new classes perform Facebook Login. For more information, see Facebook Login for Android.
AccessTokenTracker - This new class receives notifications of access token changes. This includes when a token gets updated, or when a different user logs in. See Facebook Login for Android, Track Access Tokens.
Profile and ProfileTracker Are new classes to get notifications of profile changes, such as when a different person logs in to your app. See Facebook Login for Android, Track Current Profile.
Login and Graph API Errors - LoginManager can now resolve GraphRequest errors which are login related. See LoginManager.resolveError()
Sharing:
ShareApi class to help sharing through the Graph API.Dialogs:
*Dialog class has an associated *Content class with a Builder so you can easily set parameters.Deprecated - Any classes or methods marked as @deprecated in 3.x have been removed. Some feature specific classes have been moved into their own packages such as com.facebook.login and com.facebook.share.
Graph API - GraphObject, OpenGraphObject and OpenGraphAction classes have been removed in favor of using JSON objects directly. Apps that use OG objects/actions for sharing can still use the helper methods in the ShareOpenGraphObject and ShareOpenGraphAction classes to build an OG object/action. This allows developers to use ProGuard on their entire project.
UiLifecycleHelper removed - This is removed and the various onActivityResult or handleOnActivityResult calls for passing results for login or the dialogs are now in the CallbackManager class.
LoginFragment - Has been removed.
Picker fragments - Have been removed.
Sharing:
Sharing Classes - Many types for Sharing have been modified. See the Sharing on Android.
Dialog Changes - All *Dialog classes are converted to use FacebookCallback and CallbackManager.
Automatic Web Fallback - ShareDialog and AppInviteDialog automatically fall back to using a web dialog if the Facebook app is not present on device. See Sharing on Android , Built-In Share Fallbacks.
Login:
AccessToken now has userId.
Replacement Classes - Session and UserSettingsFragment have been removed and replaced by the LoginManager and AccessToken classes. LoginActivity is replaced by FacebookActivity.
Error-Handling
FacebookRequestError - Error classification has been updated.
Error Handling - Is updated, including new ways to handle errors using the SDK. See Using the Graph API, Android, Handling Errors and Troubleshooting.