Rails 4 - Get Facebook cookies from Koala gem? -


I am making a Rail 4 site for Facebook Canvas using Koala Mani I tried to follow it, But always results in zero with facebook_token .

Here's my controller (similar to the guide):

  # app / controller / application_controller.rb def facebook_cookies @facebook_cookies || = Koala :: Facebook :: Oath.Net.at_user_info_comica (cookies) and # ap / controller / photo_controllerrbbdefindex ... @access_token = facebook_cookies ['access_token'] @graph = Koala :: Facebook :: graphAPI.net (@Asset_Token) ... end  

I have received this error call on line facebook_cookies

  undefined method ` ] 'For Nil: NilClass  

I think when I call .get_user_info_from_cookie (cookies) , cookies first Ever gho Damage is not done.

The doctor does not mention anything about how to use that variable. Any help?

Thanks

I had only one problem Are not even set.

To set cookies, you need

later you need something in your JS:

  window.fbAsyncInit = function ( ) {Return FB.init ({appId: YOUR_FACEBOOK_APP_ID, cookie: true}); };  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -