# Can i access global cookies from rails?

**URL:** <https://www.ruby-forum.com/t/can-i-access-global-cookies-from-rails/187887>\
**Category:** Rails\
**Created:** [April 30, 2010, 11:20pm UTC](https://www.ruby-forum.com/t/can-i-access-global-cookies-from-rails/187887 "2010-04-30T23:20:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [April 30, 2010, 11:20pm UTC](https://www.ruby-forum.com/t/can-i-access-global-cookies-from-rails/187887/1 "2010-04-30T23:20:22Z")

</div>

hi -

i’m trying to integrate facebook authentication into my app. facebook  
sets a cookie called fbs\_xxxx where xxxx is your app id.

but, i can’t figure out how to get my hands on that that cookie inside  
rails, cookies[] only gives me access to my apps cookies.

thanks for any help,  
dino

---

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [May 1, 2010, 12:46am UTC](https://www.ruby-forum.com/t/can-i-access-global-cookies-from-rails/187887/2 "2010-05-01T00:46:24Z")

</div>

> hi -
> 
> i’m trying to integrate facebook authentication into my app. facebook  
> sets a cookie called fbs\_xxxx where xxxx is your app id.
> 
> but, i can’t figure out how to get my hands on that that cookie inside  
> rails, cookies[] only gives me access to my apps cookies.

If the cookie isn’t in your domain, then no.

Take a look at the facebooker or minifb plugins.

---

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [May 1, 2010, 12:54am UTC](https://www.ruby-forum.com/t/can-i-access-global-cookies-from-rails/187887/3 "2010-05-01T00:54:36Z")

</div>

thanks for the reply. i screwed up. in development mode, i was  
accessing my localhost, which was storing the cookie under localhost.  
when i accessed my app from the domain that i registered with  
facebook, i got access using the regular cookies array. hope this  
helps someone…

thanks again,  
dino
