title: getting cookie server side in rails when using Facebook Javascript SDK
body: <p>I'm using this example to use the Facebook Javascript SDK to login.</p>
  
  <p><a href="https://github.com/facebook/connect-js/blob/master/examples/jquery/login.html" rel="nofollow">https://github.com/facebook/connect-js/blob/master/examples/jquery/login.html</a></p>
  
  <p>Everything works fine in that I can login and it shows the profile picture in the div.</p>
  
  <p>I then want to retrieve the cookie server-side and use it to make some requests of the Facebook API.  </p>
  
  <p>I added a debugger statement in my rails application, and then restarted the server in debug mode.</p>
  
  <p>To simulate a simple request, I opened Firebug and did this:</p>
  
  <pre><code>&gt; $.get( '/', {}, {} );
  </code></pre>
  
  <p>When I am inside the debugger I run these commands:</p>
  
  <pre><code>(rdb:1) p cookies
  {}
  (rdb:1) p request.cookies
  {}
  </code></pre>
  
  <p>So, no cookies are set.  </p>
  
  <p>When I look inside Firebug, I don't see cookies set in the request headers.</p>
  
  <pre><code>Request Headersview source
  Host tixfu.com
  User-Agent Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
  Accept */*
  Accept-Language en-us,en;q=0.5
  Accept-Encoding gzip,deflate
  Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive 115
  Connection keep-alive
  X-Requested-With XMLHttpRequest
  Referer http://tixfu.com/
  </code></pre>
  
  <p>Anyone have any idea what I am doing wrong?</p>
  
  <p>If you want to hit the site, the site is tixfu.com</p>
  
  <p>Thanks, Chris</p>