Home Forums Blogary WordPress Theme Facebook "share" button not working

This topic contains 3 replies, has 2 voices, and was last updated by  daviddietz 2 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #6654


    I noticed that the Facebook “share” button doesn’t work anymore. Upon learning this, I began doing some digging. It looks like Facebook has discontinued their facebook.com/share/sharing.php?…. link. From what I gather, they’ve rolled it all in to one button in the “like” button. How can I update this in the Blogary theme? I would even be ok with hiding the current button, and pasting the “like” button code in it’s place.

    • This topic was modified 2 years ago by  daviddietz.



    I’ve added the following code to the Header.php in the WP editor, just below the <body> tag:

    <div id="fb-root"></div>
    <script>(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#xfbml=1&appId=xxxxxxxxxxxxxxx&version=v2.0";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>

    Of course, the appId=xxxxxxxxxxxxxxx has to be a working app created in Facebook developer section (which mine is).

    Now, all you have to do is add your code in blogary/template/single/content-social.php:

    <div class="fb-like" data-href="<?php echo $permalink; ?>" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div>

    • This reply was modified 2 years ago by  daviddietz.
    • This reply was modified 2 years ago by  daviddietz.
    • This reply was modified 2 years ago by  daviddietz.
    • This reply was modified 2 years ago by  daviddietz.


    Hi daviddietz, thanks for your solution. I re-checked my demo site http://ximudesign.com/blogary/ , I can share it:

    Did I miss something?




    No, I’ve since discovered that stupid Facebook has my website marked as a spam site for some reason. It, of course, is not.

    Regardless of that, Facebook actually has moved away from the https://www.facebook.com/sharer/share.php?….. link. My documented solution above is their documented solution as well.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.