diff --git a/lib/facebooker2/rails/helpers/javascript.rb b/lib/facebooker2/rails/helpers/javascript.rb index 7cbf84d..30a8b6e 100644 --- a/lib/facebooker2/rails/helpers/javascript.rb +++ b/lib/facebooker2/rails/helpers/javascript.rb @@ -40,7 +40,7 @@ module Facebooker2 (function() { var s = document.createElement('div'); s.setAttribute('id','fb-root'); - document.documentElement.getElementsByTagName("HEAD")[0].appendChild(s); + document.documentElement.getElementsByTagName("body")[0].appendChild(s); var e = document.createElement('script'); e.src = document.location.protocol + '//connect.facebook.net/#{locale}/all.js'; e.async = true; @@ -53,4 +53,4 @@ module Facebooker2 end end end -end \ No newline at end of file +end