So, I followed the instructions as mentioned here http://railscasts.com/episodes/235-devise-and-omniauth-revised and successfully setup the the sign in and sign up with twitter option. Now I am trying to setup facebook. Using the gem 'omniauth-facebook'
. After installing it. I then added to /config/initializers/devise.rb
file
config.omniauth :facebook, ENV["FB_APP_ID"], ENV["FB_SECRET_ID"]
Now, when I try to sign in with facebook. I get the error -
ArgumentError in OmniauthCallbacksController#facebook
wrong number of arguments(3 for 2)
I was doubting an error might show up. But not sure how to fix it.
My controller and user model are same as mentioned here - http://railscasts.com/episodes/235-devise-and-omniauth-revised
What am i missing?
UPDATE: I did change this in the user.rb model file
instead of
alias_method :twitter, :all
I made it
alias_method :twitter, :facebook :all
Thanks