Skip to main content

Facebook Login on iOS

This guide assumes you already created a Facebook app and enabled Facebook in Firebase Auth.

Quick Answer

Add your production iOS bundle identifier to the Facebook app, update Info.plist with your Facebook App ID and URL scheme, rebuild the app, and test login on a real iOS device.

1. Confirm the Bundle Identifier

Open the iOS project in Xcode and confirm the bundle identifier for the app target. This value must match:

  • Apple Developer app identifier;
  • Firebase iOS app;
  • Facebook app iOS bundle ID;
  • App Store Connect app record.

2. Add Bundle ID in Meta for Developers

  1. Open Meta for Developers.
  2. Select your app.
  3. Open Settings > Basic.
  4. Add the iOS bundle identifier.
  5. Save changes.

3. Update Info.plist

Open ios/<AppName>/Info.plist and update the Facebook values.

Check for:

<key>FacebookAppID</key>
<string>your-facebook-app-id</string>
<key>FacebookDisplayName</key>
<string>Your App Name</string>

Also update the URL scheme. Keep the fb prefix:

<key>CFBundleURLSchemes</key>
<array>
<string>fbyour-facebook-app-id</string>
</array>

4. Rebuild iOS

cd ios
bundle exec pod install
cd ..
yarn ios

Verification

Test on a real iOS device:

  1. Open the login screen.
  2. Tap Facebook Login.
  3. Complete the Meta login flow.
  4. Confirm Firebase creates or links the user account.
  5. Confirm logout and second login work.

Troubleshooting

ProblemFix
Login opens but fails after redirectCheck Firebase OAuth redirect URI in Facebook Login settings.
iOS says app is not configuredCheck bundle ID in Meta app settings and Info.plist.
URL scheme does not open the appConfirm CFBundleURLSchemes uses fb plus the exact App ID.
Works in debug but not releaseCheck production bundle ID, Facebook app mode, and App Store provisioning profile.

Next Steps