Skip to content

Commit

Permalink
adding some helpful JS hooks into the application.fbml.erb
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy McAnally <jeremymcanally@gmail.com>
  • Loading branch information
Mark Daggett authored and jm committed Apr 9, 2009
1 parent a552d81 commit 10f5bc2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions facebook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,14 @@ def find_facebook_account_during_uninstall
<%= render_facebook_flash() %>
<%= yield %>
<script type="text/javascript" charset="utf-8">
// Give JS access to the canvas page name;
CANVAS_PAGE_NAME= '<%= ENV["FACEBOOKER_RELATIVE_URL_ROOT"] %>';
REMOTE_HOST = '<%= url_for :controller => "/facebook", :only_path => false, :canvas => false %>';
</script>
<%= javascript_tag "AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>
<%= content_tag :script, File.readlines("public/javascripts/application.js").join("\n") %>
}
Expand Down

0 comments on commit 10f5bc2

Please sign in to comment.