What's New in the Latest Facebook SDK?

After you integrate Facebook SDK, certain App Events are automatically logged and collected for Events Manager, unless you disable Automatic App Event Logging. You may change this in your app code or through a toggle under App Events in the App Dashboard or Events Manager. Please note in the event of conflicting values between the AutoLogAppEventsEnabled flag and the toggle, we will honor the value in the ‘Automatic event logging for the Facebook SDK’ toggle. For details about what information is collected and how to disable Automatic App Event Logging, see Automatic App Event Logging.

  • Codeless App Events - Understand how people use your app and run more effective ad campaigns, with no coding required.
  • In-App Purchase Verification for Android - Verify all in-app purchases with Google Play in real-time.
  • In-App Purchases for Android and iOS - In-App Purchase event logging is automatically enabled in Facebook SDK v4.39. Visit our docs to disable logging for Android or iOS apps.

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.
  • Advertiser Tracking Enabled for iOS 14 - To comply with policy obligations for iOS 14, you will need to set User Consent flag for using FB SDK.

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:[8,9)'
  • 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