Facebook应用程序 - 通过omniauth登录 - OAuthException 191 [英] Facebook app - login through omniauth - OAuthException 191

查看:160
本文介绍了Facebook应用程序 - 通过omniauth登录 - OAuthException 191的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到问题:

 错误:{
message:无效的redirect_uri :应用程序配置不允许使用URL。,
type:OAuthException,
code:191
}

我在我的应用程序中设置了所需的密钥和令牌,在 Facebook的开发中心我设置了站点URL: http://127.0.0.1:3001 我收到上面的错误。另外我也试图设置应用程序名称空间: http://127.0.0.1:3001 ,但我得到关于错误地址格式的错误...
当我试图填写他应用程序域:并设置我的本地主机,再次错误的格式的错误..



使用localhost的fabebook应用程序的正确配置是什么?

解决方案

p>在FB应用程序中,您必须分配IP站点/应用程序域。




  • Facebook将此网址与来自该请求的网址进行匹配。

  • 您不能分配localhost或127.0.0.1

  • 您必须输入服务器的IP地址。另外,如果是rails,请用your-ip:3000来代替localhost:3000;我使用192.168.1.154:3000

  • 在您的FB APP设置中输入站点IP地址和APP域中的相同IP地址。

  • 获取您的IP在终端中运行ifconfig命令,如果它是Linux或ipconfig如果Windows。



让我知道如果它不工作。 / p>

I am facing with the problem:

  "error": {
      "message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
      "type": "OAuthException",
      "code": 191
   }

I set up in my app the needed keys and tokens, in the Facebook's dev center I set up Site URL: to http://127.0.0.1:3001 and I am getting the error above. Also I tried to set up App Namespace: to http://127.0.0.1:3001, but I am getting error about bad address format... When I tried to fill out he App Domain: and set there my localhost, again the error for the bad format...

What is the correct configuration the fabebook app with localhost?

解决方案

Yes in FB App you have to assign an IP Site/ App Domain.

  • Facebook matches this url with the url of the request where it came from.
  • You can not assign localhost or 127.0.0.1
  • You have to enter the IP address your server. Also if it is rails then call the site with your-ip:3000 instead of localhost:3000; I use 192.168.1.154:3000
  • Enter the same IP address in IP of the site and APP Domain in your FB APP Settings.
  • To get your IP run ifconfig command in terminal if it is Linux or ipconfig if windows.

let me know if it doesn't work.

这篇关于Facebook应用程序 - 通过omniauth登录 - OAuthException 191的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆