Tagged: Facebook SDK for JavaScript
Dear Support team,
May you please kindly get back to me when you have a chance?
I would like to add the following script after the opening <body> tag on each page.
<script>
window.fbAsyncInit = function() {
FB.init({
appId : ‘XXXXXXXXXXXXX’,
xfbml : true,
version : ‘v2.3’
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = “//connect.facebook.net/en_US/sdk.js”;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));
</script>
If you have any questions, please do not hesitate to contact me.
Kind regards,
Patrick
Hi Patrick!
You will have to create a child theme
http://kriesi.at/documentation/enfold/using-a-child-theme/
and then copy the header.php, edit it with your codeeditor and paste the JS inside.
Let us know if you need anything else
Regards,
Basilis