diff --git a/lib/facebooker2/rails/helpers/javascript.rb b/lib/facebooker2/rails/helpers/javascript.rb index 47b428f..3ebb432 100644 --- a/lib/facebooker2/rails/helpers/javascript.rb +++ b/lib/facebooker2/rails/helpers/javascript.rb @@ -29,6 +29,7 @@ def fb_connect_async_js(app_id=Facebooker2.app_id,options={},&proc) status : #{status}, // check login status cookie : #{cookie}, // enable cookies to allow the server to access the session #{"channelUrl : '#{channel_url}', // add channelURL to avoid IE redirect problems" unless channel_url.blank?} + #{"frictionlessRequests : true," if options[:frictionless_requests]} oauth : true, music : #{music}, //turn on music for OG xfbml : #{xfbml} // parse XFBML diff --git a/spec/helpers/javascript_spec.rb b/spec/helpers/javascript_spec.rb index 6a93754..8ee95ad 100644 --- a/spec/helpers/javascript_spec.rb +++ b/spec/helpers/javascript_spec.rb @@ -58,6 +58,13 @@ js = fb_connect_async_js '12345' js.include?("oauth").should be_true, js end + + # to include support for frictionless app requests https://developers.facebook.com/blog/post/569/ + it "enables frictionless requests" do + js = fb_connect_async_js '12345', :frictionless_requests => true + js.include?("frictionlessRequests : true").should be_true, js + end + # Can't get this to work! # it "adds extra js" do