Omniauth - Display facebook connect as popup

烂漫一生 提交于 2019-11-30 08:53:55

At where you set your Facebook ID and secret key, add one more extra option as:

:display => "popup"

Actually, in the current version of omniauth-facebook, this is what works for me:

:authorize_params => { :display => 'popup' }
kravc

If you're using heroku, then use this option:

config.omniauth :facebook, ENV['FB_APP_ID'], ENV['FB_APP_SECRET'], {:scope => 'email, offline_access', :client_options => {:ssl => {:ca_file => '/usr/lib/ssl/certs/ca-certificates.crt'}}, :display => 'popup' }

If you're using this with Devise, simply edit your development.rb (and production.rb) to the following;

config.omniauth :facebook, FACEBOOK_API, FACEBOOK_SECRET, :display => 'popup'

Make sure you restart your rails server upon editing these files.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!