title: Facebook JavaScript SDK does not set access token cookie in chrome after FB.login call
body: <p>I'm using the Facebook JavaScript SDK to implement login for my site. I've already got it working on Safari and Firefox, but not in Chrome. </p>
  
  <p>After the FB.login method is called, I'm able to retrieve the access token from Facebook, but it's not setting the access token and user ID in the cookies like it does in Firefox and Safari. Currently, I'm manually writing the access token and the user ID to the cookies so the login flow works but it still bugs the heck out of me that the access token is not written in Chrome alone.</p>
  
  <p>Has anybody come across this before and know a fix at hand? Much appreciated.</p>
  
  <p>Below are my code for the init and login logic:</p>
  
  <pre><code>window.fbAsyncInit = function() {
    FB.init({
      appId      : "#{AppConfig.facebook['app_id']}", // App ID
      status     : true, // check login status
      cookie     : true, // enable cookies to allow the server to access the session
      xfbml      : true  // parse XFBML
    });
  
    // Additional initialization code here
  };
  
  // Load the SDK Asynchronously
  (function(d){
     var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement('script'); js.id = id; js.async = true;
     js.src = "//connect.facebook.net/en_US/all.js";
     ref.parentNode.insertBefore(js, ref);
   }(document));
  
  $(function() {
    $(".fb-login-button").click(function() {
      FB.login(function(response) {
        if (response.authResponse) {
          console.log("Welcome! Fetching your information...");
          $.cookie("user_id", response.authResponse.userID);
          $.cookie("access_token", response.authResponse.accessToken);
          window.location = "#{oauth_facebook_callback_url}";
        } else {
          console.log("User cancelled login or did not fully authorize.");
        }
      }, {scope: 'publish_stream,offline_access,email,user_events,create_event,user_location'});
    });
  });
  </code></pre>