HEy all,
I'm trying to set up the Facebook 'Like' button on one of my sites but I cannot get it to play ball.
In IE it seems to work when a page is first loaded, but not after that when you refresh the page.
In FF it will not work at all - 'FB.provide is not a function' is the error that Firebug gives me, but apparently this error is in the FB script. It must work, else the whole world would probably be screaming, but I cannot see what is wrong.
My code -
$href = get_permalink();
$like_button = '<div id="fb-root"></div><div class="fb-like" data-href="'.$href.'" data-send="false" data-layout="button_count" data-width="10" data-show-faces="true" data-action="recommend" data-font="lucida grande"></div>';
and in my site JS (copied exactly from the FB code generator -
(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/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
Any help here would be apprciated.
Thanks.