Facebook"无效的redirect_uri",但网址对我来说很好看

b-r*_*yce 26 javascript facebook oauth-2.0

尝试使用OAuth对Facebook进行身份验证时出现以下错误:

{
   "error": {
      "message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
      "type": "OAuthException"
   }
}
Run Code Online (Sandbox Code Playgroud)

我的网址看起来像这样:

https://graph.facebook.com/oauth/authorize?client_id=283993944973616&redirect_uri=http://dennys-m.appspot.com/fb_login/&scope=publish_stream,email&display=popup
Run Code Online (Sandbox Code Playgroud)

我知道有很多其他帖子有这个问题,但我看不出是什么会让我的网址无效.有什么想法我收到这个错误?

asd*_*hak 30

您重定向URL:http://dennys-m.appspot.com/fb_login/必须符合canvas urlhttps://developers.facebook.com/apps/配置面板.

幸运的是,这些天Facebook给出了错误信息Invalid redirect_uri: Given URL is not allowed by the Application configuration.大约一年前没有出现这样的例外,只是奇怪的结果.

  • 就是这样.万分感谢. (2认同)

Del*_*019 11

你必须注册你redirect URLFacebook console

首先去 Advanced里面的标签Settings

在此输入图像描述

向下滚动到 Valid OAuth redirect URIs

url在您保存更改的那一刻注册您的那里它将停止给出此例外

在此输入图像描述


lor*_*d_t 10

在我的情况下/,我的重定向uri结束时没有!没有评论fb ..