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
- Open Meta for Developers.
- Select your app.
- Open Settings > Basic.
- Add the iOS bundle identifier.
- 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:
- Open the login screen.
- Tap Facebook Login.
- Complete the Meta login flow.
- Confirm Firebase creates or links the user account.
- Confirm logout and second login work.
Troubleshooting
| Problem | Fix |
|---|---|
| Login opens but fails after redirect | Check Firebase OAuth redirect URI in Facebook Login settings. |
| iOS says app is not configured | Check bundle ID in Meta app settings and Info.plist. |
| URL scheme does not open the app | Confirm CFBundleURLSchemes uses fb plus the exact App ID. |
| Works in debug but not release | Check production bundle ID, Facebook app mode, and App Store provisioning profile. |