Omniauth+Devise+Facebook = 发生错误。请稍后重试
我逐字遵循以下说明: https://github.com/plataformatec/devise/wiki/ OmniAuth:-概述
config/initializers/devise.rb:
require "omniauth-facebook"
config.omniauth :facebook, "xxx", "yyy", :scope => 'email,offline_access,read_stream', :display => 'popup'
“查看”链接有效,它要求我使用 Facebook 登录。但是,当单击它时,我收到“发生错误。请稍后再试。”。没有其他信息或错误。
在我的 Facebook 应用程序中,未设置“应用程序域”,并且站点 URL 设置为“localhost:3000”。
我的直觉告诉我该配置/回调有问题,但是 localhost:3000/users/auth/facebook/callback 工作正常。
提前致谢!
编辑:当我在登录拥有该应用程序的 Facebook 帐户时尝试登录时,它运行良好。当我尝试使用其他 Facebook 帐户时,会出现此错误。
编辑2:弄清楚了http://cl.ly/D6st
I followed these instructions verbatim: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview
config/initializers/devise.rb:
require "omniauth-facebook"
config.omniauth :facebook, "xxx", "yyy", :scope => 'email,offline_access,read_stream', :display => 'popup'
The View link works and it asks me to Sign In with Facebook. However, when clicking it, I get "An error occurred. Please try again later.". No other information or errors.
In my facebook app, 'app domain' is not set, and site URL is set to 'localhost:3000'.
My gut is telling me there is something wrong with that configuration/callback, however localhost:3000/users/auth/facebook/callback works fine.
Thanks in advance!
EDIT: When I try the login while logged in to the Facebook account that owns the app, it works perfectly. When I try with a different Facebook account, this error fires.
EDIT 2: Figured it out http://cl.ly/D6st
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
转到 Facebook 应用程序的设置,将
沙箱
设置为禁用
就这样。
Go to your facebook application's settings set
sandbox
todisable
Thats all.