require 'rack/facebook'
ActionController::Dispatcher.middleware.insert_after 'ActionController::RewindableInput',Rack::Facebook, Facebooker.secret_key
# Somewhere in 2.3 RewindableInput was removed- rack supports it natively
require 'rack/facebook'
ActionController::Dispatcher.middleware.insert_after( 
  (Object.const_get('ActionController::RewindableInput') rescue false) ?
    'ActionController::RewindableInput' :
    'ActionController::Session::CookieStore',
  Rack::Facebook,
  Facebooker.secret_key )

Allow the rack middle_ware to fall back from after RewindableInput to after Session::CookieStore if RewindableInput is not available. It was removed somewhere in Rails 2.3
Allow the rack middle_ware to fall back from after RewindableInput to after Session::CookieStore if RewindableInput is not available.  It was removed somewhere in Rails 2.3
