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

XF 1.4 Adding Facebook like to every page, some pages work & some don't

I made this template:
<xen:require css="share_page.css" />
<div class="sharePage">
    <xen:if is="{$xenOptions.facebookLike}">
    <div class="facebookLike shareControl">
        <xen:container var="$facebookSdk">1</xen:container>
        <div class="fb-like" data-href="http://mydomain.com{$requestPaths.requestUri}" data-width="400" data-layout="standard" data-action="{$xenOptions.facebookLikeAction}" data-show-faces="true" data-colorscheme="@fbColorScheme"></div>
Placed it where I want it to go. It shows up just fine on the homepage. But if I view a forum the like button doesn't appear. I looked at the code and it looks ok to me. The data-href is populated with the correct url. It's like the JS never loads to run it. But I looked in the footer and I see in _loadedscripts share_page = true. Any tips?

If I place the JS from Facebook to load the widget inside the template I made, then the button appears on every page.