title: Unsuccessful debug_token response from Facebook: The App_id in the input_token did not match the Viewing App
body: <p>I'm implementing facebook authentication in my Ionic app and I keep getting the above error.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  facebookLogin() {
      return this.facebook.login(['email'])
        .then((res: FacebookLoginResponse) =&gt; {
          console.log('root', res);
          if (res.status === 'connected') {
            console.log('res', res);
            const credential = firebase.auth.FacebookAuthProvider
                                .credential(res.authResponse.accessToken);
            console.log('credential', credential);
            this.afAuth.auth.signInWithCredential(credential)
              .then((response) =&gt; {
                this.getUserdetail(res);
                console.log(response);
              }).catch((error) =&gt; {
                console.log('facebookLogin', error);
              });
            }
        }).catch((error) =&gt; {
          console.log(error);
          alert('error:' + error);
        });
    }</code></pre>
  </div>
  </div>
  </p>
  
  <p>The console shows me I'm getting the credentials:</p>
  
  <p><a href="https://i.stack.imgur.com/60wkt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/60wkt.png" alt="enter image description here"></a></p>
  
  <p>But afterwards i get the following error:</p>
  
  <p>"Unsuccessful debug_token response from Facebook: {"error":{"message":"(#100) The App_id in the input_token did not match the Viewing App","type":"OAuthException","code":100,"fbtrace_id":"***********"}}"</p>
  
  <p>One thing I noticed is in the config.xml there was already an ID.  I tried changing that to the app ID provided in the facebook developer console to no avail.</p>
  
  <p>I've also searched for solutions in Stack and one suggested disabling App Secret in the facebook dev console but that option is already disabled.</p>
  
  <p>Any help would be greatly appreciated...I've been stuck on this for a while now.</p>
  
  <p>Thanks</p>