BobbyWibowo
Well-known member
I figured something. In share_page template, there is this line that will only be applied when you enabled Facebook Like button in Admin CP:
Then in page_container_js_body template, that variable will be used to decide the value of this JS var:
Since my add-on would overwrite the original share_page template, $facebookSdk was never set to 1 regardless of whether you enabled Facebook Like button or not. So I tried to forcibly set $facebookSdk from one of my add-on's template and then Facebook Comments worked just fine. But.. after I removed the line afterwards from the said template, XenForo.Facebook.forceInit appeared to be 'stuck' with true. Even when I forcibly set $facebookSdk to 0, it'd remain stuck with true... Is there any caching for page_container_js_body that I'm not aware of or something???
cc: @Jaxel if you know anything about this..
HTML:
<xen:container var="$facebookSdk">1</xen:container>
HTML:
XenForo.Facebook.forceInit
Since my add-on would overwrite the original share_page template, $facebookSdk was never set to 1 regardless of whether you enabled Facebook Like button or not. So I tried to forcibly set $facebookSdk from one of my add-on's template and then Facebook Comments worked just fine. But.. after I removed the line afterwards from the said template, XenForo.Facebook.forceInit appeared to be 'stuck' with true. Even when I forcibly set $facebookSdk to 0, it'd remain stuck with true... Is there any caching for page_container_js_body that I'm not aware of or something???
cc: @Jaxel if you know anything about this..