Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding some helpful JS hooks into the application.fbml.erb

Signed-off-by: Jeremy McAnally <jeremymcanally@gmail.com>
  • Loading branch information...
commit 10f5bc25e4067968dcf3e950a95538dcbc1f79ed 1 parent a552d81
Mark Daggett authored jm committed
Showing with 8 additions and 0 deletions.
  1. +8 −0 facebook.rb
8 facebook.rb
View
@@ -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") %>
}
Please sign in to comment.
Something went wrong with that request. Please try again.