#fb-root :javascript window.fbAsyncInit = function() { FB.init({appId: '#{configatron.auth_providers.facebook.key}', status: true, cookie: true, oauth: true, xfbml: true}); }; (function() { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); }());