I'm having issues trying to get the counter to work on individual pages for a website I am working on, this is my code:
<script>
window.fbAsyncInit = function() {
FB.Event.subscribe('edge.create', function(href, widget) {
shareOmniture(href, "Facebook", widget);
});
}
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js#appId=168111866601316&xfbml=1";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
<div class="fb-like" data-send="false" data-layout="box_count" data-width="47" data-show-faces="false"></div>
On all the pages except the home page, the counter always says 0 after refreshing the page. I have the meta data set up but I didn't include the og:url or the data-url because facebook is suppose to grab the URL depending on what page you're currently on and not a specific one. Users are able to click the like and post it to their wall and this works perfectly but the counter doesn't add up.
The event at the beginning of the script is for analytics purposes and shouldn't have any affect as removing it didn't change the result.
This is the site:
anznetball.co.nz
The only thing that worked is adding data-url to the fb-like div, so I am doing this dynamically now on each page and it works perfectly.