Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `tr' for nil:NilClass #89

Open
jai-n opened this issue Nov 9, 2013 · 0 comments
Open

undefined method `tr' for nil:NilClass #89

jai-n opened this issue Nov 9, 2013 · 0 comments

Comments

@jai-n
Copy link

jai-n commented Nov 9, 2013

I have debug the code and found this line give me error above
client = Mogli::Client.create_from_code_and_authenticator(data["code"], authenticator)
in following file

lib/facebooker2/rails/controller.rb

def oauth2_fetch_client_and_user_from_cookie
return unless fb_cookie?
sig,payload = fb_cookie.split('.')
return unless fb_signed_request_sig_valid?(sig, payload)
data = JSON.parse(base64_url_decode(payload))
authenticator = Mogli::Authenticator.new(Facebooker2.app_id, Facebooker2.secret, '')
client = Mogli::Client.create_from_code_and_authenticator(data["code"], authenticator)
user = Mogli::User.new(:id=>data["user_id"])
oauth2_store_client_and_user_in_session(client,user)
fb_sign_in_user_and_client(user, client)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant