Skip to content

Commit

Permalink
Merge pull request #88 from kdmny/master
Browse files Browse the repository at this point in the history
allows configuration setting for frictionless requests
  • Loading branch information
mmangino committed Apr 1, 2013
2 parents c43b44d + f726588 commit 6a32a36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/facebooker2/rails/helpers/javascript.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions spec/helpers/javascript_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6a32a36

Please sign in to comment.