facebookpublish,themen fixes

This commit is contained in:
2014-06-20 00:15:45 +05:30
parent 61510a8891
commit 2df0d89b61
16 changed files with 158 additions and 37 deletions

View File

@@ -1,15 +1,17 @@
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
skip_before_filter :verify_authenticity_token
def failure
# flash[:notice] = "Failure #{Hash.new(request.env)} #{Hash.new(params)}"
#redirect_to new_user_registration_url , :notice=>"Omniauth Login failed"
super
end
def facebook
skip_before_filter :verify_authenticity_token
def failure
# flash[:notice] = "Failure #{Hash.new(request.env)} #{Hash.new(params)}"
#redirect_to new_user_registration_url , :notice=>"Omniauth Login failed"
super
end
def facebook
# You need to implement the method below in your model (e.g. app/models/user.rb)
@user = User.find_for_facebook_oauth(request.env["omniauth.auth"], current_user)
data=request.env["omniauth.auth"]
session[:fbuser_access_token]=data.credentials.token
if @user
sign_in_and_redirect @user, :event => :authentication #this will throw if @user is not activated