title: react native facebook login using expo client: The App_id in the input_token did not match the Viewing App
body: <p>I am using expo-facebook to integrate a Facebook login using expo and firebase. Everything looks to be working and I log into Facebook but get an OAuthException once I authenticate using Facebook as follows:</p>
  <pre><code>Unsuccessful debug_token response from Facebook: {&quot;error&quot;:{&quot;message&quot;:&quot;(#100) The App_id in the input_token did not match the Viewing App&quot;,&quot;type&quot;:&quot;OAuthException&quot;,&quot;code&quot;:100
  </code></pre>
  <p>I have gone through a lot of issues on Stack Overflow, GitHub and looked at expo documentation as well but to no avail.<br />
  I have configured the app id and secrets from Facebook into firebase as required as well as set up the OAuth redirect URI to my Facebook app configuration. The code I have put together to setup the login is as follows:</p>
  <pre><code>const signInWithFacebook = async () =&gt; {
      try {
        // const { type, token } = await Facebook.logInWithReadPermissionsAsync(
        //   facebookAppId,
        //   {
        //     permissions: [&quot;public_profile&quot;],
        //   }
        // );
        const appId = Constants.manifest.extra.facebook.appId;
        const permissions = [&quot;public_profile&quot;]; // Permissions required, consult Facebook docs
  
        await Facebook.initializeAsync({
          appId: appId,
        });
  
        const { type, token } = await Facebook.logInWithReadPermissionsAsync({
          permissions: permissions,
        });
        console.log(type);
        console.log(token);
        if (type === &quot;success&quot;) {
          await firebase
            .auth()
            .setPersistence(firebase.auth.Auth.Persistence.LOCAL);
          const credential = firebase.auth.FacebookAuthProvider.credential(token);
          const facebookProfileData = await firebase
            .auth()
            .signInWithCredential(credential);
          //this.onLoginSuccess.bind(this);
          console.log(facebookProfileData);
        }
      } catch ({ message }) {
        console.log(message);
        alert(`Facebook Login Error: ${message}`);
      }
    };
  </code></pre>
  <p>I have also setup the relevant configurations in the app.json as follows:</p>
  <pre><code>&quot;expo&quot;:{
      &quot;facebookScheme&quot;: &quot;fb123243435566&quot;,
      &quot;facebookAppId&quot;: &quot;123243435566&quot;,
      &quot;facebookDisplayName&quot;: &quot;myapp&quot;
    }
  </code></pre>
  <p>The only aspect I am not sure about is where to grab the facebookScheme. Currenltly I have assumed it's fb+AppID. the documenatation mentioned here <a href="https://docs.expo.dev/versions/latest/sdk/facebook/" rel="nofollow noreferrer">https://docs.expo.dev/versions/latest/sdk/facebook/</a>
  isn't clear. It states:</p>
  <p><strong>Configure app.json</strong>.<br />
  Add the field facebookScheme with your Facebook login redirect URL scheme found here under &quot;4. Configure Your info.plist.&quot; It should look like &quot;fb123456&quot;. If you do not do this, Facebook will not be able to redirect to your app after logging in.</p>
  <p>But I am not sure how to grab that facebookScheme id. I suspect this is where the issue is as expo states that.<br />
  <strong>Expo Go from the Android Play Store will use the Facebook App ID that you provide, however, all Facebook API calls in the Expo Go from the iOS App Store will use Expo's own Facebook App ID. This is due to underlying configuration limitations.</strong>
  so I am assuming the facebookScheme is some kind of workaround.</p>
  <p>Although I am not sure if it's a working around for the ios standalone app or the expo managed.</p>