Learn, Share, Build

182
September 26, 2017, at 1:01 PM

I'm setting up a Shopify site and I am trying to load the Facebook Javascript SDK on the home page just below the body tag like this:

<body>
<script>
window.fbAsyncInit = function() {
FB.init({
  appId            : 'xxxxxxxxxxxxxx',
  autoLogAppEvents : true,
  xfbml            : true,
  version          : 'v2.10'
});
FB.AppEvents.logPageView();
};
(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>

....some html.....

</body>

However, I am getting this error. Any advice?

READ ALSO
Learn, Share, Build

Learn, Share, Build

I'm trying to create atxt file on my server when a user submits a form

157
Learn, Share, Build

Learn, Share, Build

I have a code in which I need assistance withBasically, I have a panel with 4 slides

167
Learn, Share, Build

Learn, Share, Build

What I'm trying to do is position 3 elements (could be 4/5/6, needs to be dynamic) vertically with position:absolute inside a containerI know this can be achieved with some CSS, but unfortunatley I have to do this in JavaScript so I need a function / algorithm...

199
Learn, Share, Build

Learn, Share, Build

I have tried debugging my JavaScript for its correctnessI t seems the values for innerwidth and innerheight is passing correctly

167