Omniauth - display facebook as a popup

I use Omniauth and force / auth / facebook to display in a popup (with JS). [Instead of a new window, which is much less convenient)

The problem is that Omniauth loads the FB URL using

display=page 

Instead of what I want:

 display=popup 

Does anyone know how I can change the options used by Omniauth for facebook?

thank

+13
facebook omniauth
Dec 19 '10 at 15:21
source share
4 answers

When you set your Facebook ID and secret key, add another additional parameter:

 :display => "popup" 
+16
Jan 05 2018-11-11T00:
source share

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

 :authorize_params => { :display => 'popup' } 
+3
Nov 11 '11 at 16:45
source share

If you use a hero, 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' } 
+3
Feb 25 2018-12-25T00:
source share

If you use this with Devise, simply edit the development.rb file (and production.rb) as follows:

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

Make sure you restart the rails server after editing these files.

+1
Sep 16 2018-11-11T00:
source share



All Articles