Q: Is rfacebook v0.9.7 ready for Rails 2.0?
January 4, 2008 — Gerald
Update (Jan/9): rfacebook v0.9.8 is ready. Matt Pizzimenti published a story about the update titled “RFacebook 0.9.8 out, reinstall your plugin too“.
Notes about v0.9.7 - the rfacebook gem version 0.9.7 released on September, 29th 2007:
Paul Dowman writes in the posting “rfacebook and Rails 2“:
I’m using rfacebook with Rails 2. I needed to patch controller_extensions.rb (to fix up url_for and redirect_to).
Mason Browne writes in the story “Using Rails 2.0.1 with rfacebook“:
Using Rails 2.0 you’ll have to make two changes to your environment.rb file:
First, Facebook doesn’t hang on to cookies for you, and since Rails’ new default convention for sessions is cookies, you’ll have to change that to either filesystem or database. I usually go for database:
config.action_controller.session_store = :active_record_store
Second, Rails 2.0 boasts forgery protection, but that won’t work with Facebook proxying.
So:
config.action_controller.allow_forgery_protection = false
Chris Bailey comments:
I commented out the protect_from_forgery call in application.rb as an alternative to setting allow_forgery_protection.
Also, I’ve found that rfacebook’s redirect_to and url_for handling breaks with Rails 2.x. I’ve had to explicitly specify the paths instead.
1 year ago