What's New in the Latest Facebook SDK?

New Privacy Features

  • Delay Automatic Event Logging for Android or iOS - Pause logging of app events, such as app installs and app launches, until User consent has been obtained.
  • Delay SDK Initialization for Android or iOS - Block all network requests until User consent has been obtained.

How to Upgrade?

Android

  • If your app integrates with the Facebook SDK using dynamic versioning in Maven, then you only need to rebuild your project. Upgrading the SDK requires a clean rebuild of your app. Gradle resolves any dependencies and downloads the latest SDK for your app.

  • If your app integrates with the Facebook SDK in Maven but does not use dynamic versioning, upgrade now by modifying your build.gradle file with the following code and rebuild your project.
    implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
  • If your app integrates with the SDK manually, please switch to Maven and dynamic versioning by following our Getting Started Guide.

iOS

  • If your app integrates with the Facebook SDK using CocoaPods, add the following code to your Podfile.
    pod 'FacebookSDK'
    pod 'FacebookSDK/LoginKit'
    pod 'FacebookSDK/ShareKit'
    pod 'FacebookSDK/PlacesKit'
    
    pod 'FBSDKMessengerShareKit'

    Then run pod update.

  • If your app integrates with the Facebook SDK manually, please switch to CocoaPods by following our Getting Started Guide