• Resolved jpl980

    (@jpl980)


    I’ve followed these instructions on setting up a FB id, but still can’t seem to get the counts to show. I’m using the FB API v2.8. I’ve input the FB App ID & secret token.

    I’ve also input the following FB SDK for Javascript code after the opening <body> tag in the header.php of my child theme.

    <script>
      window.fbAsyncInit = function() {
        FB.init({
          appId      : '############# (my ID here)',
          xfbml      : true,
          version    : 'v2.8'
        });
        FB.AppEvents.logPageView();
      };
    
      (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";
         fjs.parentNode.insertBefore(js, fjs);
       }(document, 'script', 'facebook-jssdk'));
    </script>

    This is an example post where you can see the FB count is not working.

    Any ideas how I can fix this? Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author CrestaProject

    (@crestaproject)

    Hi jpl980,
    this is the result of the Facebook API for the post that you used as an example https://graph.facebook.com/?id=https://josephpliu.com/run-informational-interview/
    As you can see this post has 0 shares on Facebook.

    PS: Perhaps you made the switch from https to https? Because Facebook uses 2 different counters for url’s with http and https.
    In fact the same post but on http has 28 shares on Facebook https://graph.facebook.com/?id=http://josephpliu.com/run-informational-interview/
    Other social media (LinkedIn, Google Plus, etc.) do not make differences between http and https urls but unfortunately Facebook sees this as two different urls.

    CrestaProject

    Thread Starter jpl980

    (@jpl980)

    Cresta, thanks for looking into this. This would explain it, as I did make the switch from http to https. Do you know if there’s any workaround for this so that both the older http links AND the new https links are both included in the Creta FB counter? For example, is there anything I can do with my FB app setup?

    Plugin Author CrestaProject

    (@crestaproject)

    Unfortunately, Facebook should be to merge the shares of the two protocols because other social media already do it 🙂

    Maybe (I’m not sure) if you change the “canonical URL” for your post you can show the Facebook share count for the http version.
    If you are using Yoast SEO plugin, here you can find a simple guide to change the canonical URL for an individual post https://kb.yoast.com/kb/canonical-urls-in-wordpress-seo/

    Best Regards,
    CrestaProject

    Thread Starter jpl980

    (@jpl980)

    Creta, okay, I tried that, but it didn’t work. Thanks for attempting to help me with this though. If you happen to be able to find a way to work around this FB count issue in your future updates, I’d definitely welcome it!

    Plugin Author CrestaProject

    (@crestaproject)

    Sure!
    Thank you
    CrestaProject

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Facebook count not working’ is closed to new replies.