Skip to main content
This package cannot be used in the “Expo Go” app because it requires custom native code. You must use Expo Development Builds or Bare Workflow.

Installation

1

Install the package

2

Add the config plugin

Add the config plugin to your app.json or app.config.js:
3

Rebuild your app

Every time you change the plugin configuration, you must rebuild your native app.
See the Expo documentation for more details.

Configuration Options

Required Configuration

Unlike the deprecated expo-facebook package, the clientToken field is required for this library. You can get this value from Facebook Developers > Your App > Settings > Advanced.

Optional Configuration

Example Configuration

Here’s a complete example with all options:

Enabling Auto App Installs

To enable automatic app install tracking in Expo:
1

Update configuration

Set both flags to true in your config:
2

Request tracking permission (iOS)

On iOS, you need user consent to collect user data. This is required by Apple’s App Tracking Transparency framework.
Add this code somewhere in your App.tsx or main app component:

Expo Bare Workflow - iOS AppDelegate Setup

If you’re using Expo Bare Workflow with React Native 0.77+, your AppDelegate.swift will extend ExpoAppDelegate instead of the standard React Native app delegate.

Required Imports

Example Implementation

  • Always call super methods to maintain Expo functionality
  • The ExpoAppDelegate already handles many React Native bridge initialization tasks
  • Ensure your Expo modules are compatible with the Facebook SDK

Migrating from expo-facebook

The expo-facebook module was deprecated in Expo SDK 45 and removed in SDK 46. Here are the key differences:

Key Changes

  1. Client Token is Required: Unlike expo-facebook, the clientToken field is mandatory
  2. Different API: The JavaScript API has changed significantly
  3. New Package Name: Use react-native-fbsdk-next instead of expo-facebook

Feature Parity Table

Android Setup

For Android-specific setup (key hashes, strings.xml, etc.), the config plugin handles most of the configuration automatically. However, you may still need to:
  1. Generate and add key hashes to Facebook Developer Console (especially for release builds)
  2. Configure ProGuard rules if using code obfuscation
See the Android Setup guide for detailed instructions.

Next Steps

Once Expo setup is complete, you can: