首页 > 解决方案 > 来自 Facebook 的 debug_token 响应不成功:input_token 中的 App_id 与查看应用程序不匹配

问题描述

我正在我的 Ionic 应用程序中实现 facebook 身份验证,但我不断收到上述错误。

  facebookLogin() {
    return this.facebook.login(['email'])
      .then((res: FacebookLoginResponse) => {
        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) => {
              this.getUserdetail(res);
              console.log(response);
            }).catch((error) => {
              console.log('facebookLogin', error);
            });
          }
      }).catch((error) => {
        console.log(error);
        alert('error:' + error);
      });
  }

控制台显示我正在获取凭据:

在此处输入图像描述

但之后我收到以下错误:

"来自 Facebook 的 debug_token 响应不成功:{"error":{"message":"(#100) input_token 中的 App_id 与查看应用程序不匹配","type":"OAuthException","code":100," fbtrace_id":"*************"}}"

我注意到的一件事是在 config.xml 中已经有一个 ID。我尝试将其更改为 facebook 开发人员控制台中提供的应用程序 ID,但无济于事。

我还在 Stack 中搜索了解决方案,其中一个建议在 facebook 开发控制台中禁用 App Secret,但该选项已被禁用。

任何帮助将不胜感激......我已经坚持了一段时间了。

谢谢

标签: facebookfirebase-authenticationionic4

解决方案


推荐阅读