1

I'm currently facing this problem with ruby on rails 3, devise and facebook oauth.

When I click the button that connects me using facebook, I want the accept button in the prompt to say Log In with Facebook instead of Install.

This is located in my devise.rb file:

require 'omniauth-facebook'
config.omniauth :facebook, FACEBOOK_KEY, FACEBOOK_SECRET

In my facebook app settings, I can see a bunch of options for configuring the auth dialog, but I see none regarding that button. I'm starting to think I created the wrong type of app. Perhaps it isn't an app I should have created but some sort of website connection? But I don't know where I can create that in www.developers.facebook.com. This should be fairly easy but googling yielded me nothing.

3
  • This post is a little old but it describes the process of setting up omniauth and devise together in rails. Check it out, could help you address your problem. I have a feeling that you're not supposed to put the omniauth configuration statements inside of devise.rb, but I'm not really sure.
    – Batkins
    Jan 24, 2012 at 16:03
  • I've tested it thoroughly and using current versions, you don't need an omniauth.rb file in your initializers. Now you use separate gems and require and configure them like that in the devise.rb file. Here's the documentation: github.com/plataformatec/devise/wiki/OmniAuth:-Overview As a side note, the login function is working, I just want to change what the button says because it's misleading!
    – Ashitaka
    Jan 24, 2012 at 16:09
  • Hmm... I'm actually seeing this too now. I'm not using devise so I don't think it has anything to do with devise. Up until a few days ago it didn't prompt me to install, it asked if I wanted to login. So perhaps this is a new thing with facebook. Actually just went to my facebook app configuration and previewed my login dialog and it looks as though that is the case.
    – Batkins
    Jan 24, 2012 at 16:27

1 Answer 1

1

After much testing and searching, I found out the answer although I don't like it much. With this:

# devise.rb
config.omniauth :facebook, FACEBOOK_KEY, FACEBOOK_SECRET, :display => 'popup'

The prompt now says Log In with Facebook instead of Install. The problem is that with this :display => 'popup' parameter, the page displayed by Facebook is really formatted to be used as a popup instead of a redirected page (so there is lot of white space). I guess I'll have to dig in a little to figure out how make it a real popup.

EDIT: To turn the page into a popup, check out Chris Heald's answer to this other question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.