• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Add Facebook SDK all the time

abdfahim

Active member
#1
How can I make sure the following FB SDK is added all time - signed in or out, responsive or non-responsive no matter what.

I tried adding them after body tag in page_container_js_body template, but seems like it cause some conflict (may be due to duplicate definition?)


Code:
<div id="fb-root"></div>
<script>(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#xfbml=1&version=v2.8&appId=11111111111111";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
 
Last edited: