Hi, thanks for taking the time to read my article. Visit aaronvb.com for more reads, and contact me below if you have questions.


You can find me on GitHub, Twitter, Instagram, Flickr, or email at bokhoven@gmail.com

Facebook Connect Javascript Cookie and Ruby on Rails

Written Aaron Van Bokhoven on Oct 25, 2010

Update: I’m currently working this into a gem. Feel free to watch/use/contribute on github: http://github.com/aaronvb/fb_js_connect

I wrote this class to verify(using Facebook’s cookie verification article) and parse the Facebook Javascript Connect cookie.

This can definitely work without Ruby on Rails, but you may need to change a few things.

Reference: Facebook Connect Javascript SDK http://developers.facebook.com/docs/reference/javascript/

To use this in Ruby on Rails, save this file into your RAILS_ROOT/lib folder. If you alter or use this code please contribute back!