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!