Facebook Login

Fast App Switch

Updated: Aug 27, 2026
Copy for LLM
Open beta
These Facebook Login features are part of an open beta. If you encounter any issues, please use our feedback form.
Fast App Switch logs people in by switching to the native Facebook app on iOS rather than routing through an in-app browser. Because they are already authenticated inside the Facebook app, the flow is faster and more familiar, and it avoids the browser cookie problems that cause avoidable re-authentication.
The SDK opens fbauth2://authorize directly against the Facebook app. When the Facebook app is not installed, login falls back to the browser-based flow automatically, so the call always completes.
Fast App Switch applies to classic Facebook Login only. Limited Login attempts, including shimmed Limited Login, continue to use the browser flow.

Requirements

RequirementNotes
Facebook SDK for iOS
18.1.1 or later. Use the latest release.
LSApplicationQueriesSchemes
Your app’s Info.plist must list fbauth2 so the SDK can deep link into the native Facebook Login flow.
Facebook app
Installed and signed in. Without it, login falls back to the browser flow.
Login type
Classic Facebook Login. Not available for Limited Login.

Set up

Add fbauth2 to LSApplicationQueriesSchemes in your Info.plist. If you already declare schemes for other Facebook features, add fbauth2 to the existing array rather than creating a second one:
<key>LSApplicationQueriesSchemes</key>
<array>
  <string>fbauth2</string>
  <string>fbapi</string>
  <string>fb-messenger-share-api</string>
</array>
That is the only required change. Once you are on a supported SDK version with the scheme declared, eligible logins app-switch automatically.
Note for apps upgrading from 18.0.2 or earlier: Fast App Switch was opt-in in 18.0.2 and is on by default from 18.0.3 onward. If your app declares fbauth2 and does not set appSwitch explicitly, eligible logins will begin switching to the Facebook app after you upgrade, with no code change on your part. Set appSwitch: .disabled to keep the previous browser-based behavior.

Control the behavior

Fast App Switch is controlled by the appSwitch property, which takes AppSwitch.enabled or AppSwitch.disabled.
appSwitch defaults to .enabled. You do not need to opt in — declare the scheme and eligible logins use the Facebook app. Set .disabled only when you specifically want to force the browser-based flow.

On a login attempt

Set appSwitch on the LoginConfiguration to control a single login attempt:
// Explicitly enable (this is already the default).
let loginConfiguration = LoginConfiguration(
    permissions: permissions,
    tracking: tracking,
    appSwitch: .enabled
)

// Force the browser-based flow instead.
let browserOnly = LoginConfiguration(
    permissions: permissions,
    tracking: tracking,
    appSwitch: .disabled
)

On the login button

Set appSwitch on an FBLoginButton to control logins performed through the button:
let loginButton = FBLoginButton()
loginButton.appSwitch = .enabled

Unity

The Facebook SDK for Unity exposes this as FB.Mobile.SetFastAppSwitchEnabled, which is iOS-only and a no-op on Android.
Call it after FB.Init() and before the login call. It affects the initial login attempt made through LoginWithTrackingPreference:
FB.Mobile.SetFastAppSwitchEnabled(true);
As on native iOS, the Unity bridge defaults to Fast App Switch being on, so you only need this call to turn it off:
FB.Mobile.SetFastAppSwitchEnabled(false);

Troubleshooting

  • Login stays in the browser. Check that fbauth2 is in LSApplicationQueriesSchemes — without it the SDK cannot detect the Facebook app. Also confirm the Facebook app is installed and signed in, and that the attempt is a classic Login rather than a Limited Login.
  • Limited Login never app-switches. That is expected. Fast App Switch is for classic Login only.
  • Nothing changes after upgrading. Confirm you are on 18.1.1 or later and that nothing in your code sets appSwitch: .disabled on the LoginConfiguration or the login button.
  • Inspect logs. Attach the device and filter the system console to the subsystem com.facebook.sdk.

See Also