Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

Official Facebook Share Count Button for your WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
Official Facebook Share Count Button for your WordPress

Not too long ago we shared how you can add a live facebook share button in your WordPress site using a third party script. Well Facebook has decided to release the official version of the fshare count button, so why rely on the third party script anymore?

To add the Official Facebook Share button simply open up a theme file of your choice and add the following code:

<a name="fb_share" type="box_count" href="">Share</a><script src="" type="text/javascript"></script>

The code above will add a big tweetmeme like button that will display count in more like a box form. If you want to display a compact version then simply use the code below:

<a name="fb_share" type="button_count" href="">Share</a><script src="" type="text/javascript"></script>

Feel free to wrap the codes around with any styling that you like. For further documentation and options visit the Official Facebook page.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. sendbad says:

    DUDE you are the man… thx alot

  2. SangramKeshariPatra says:

    I don’t want “207 people like this. Be the first of your friends.” this text on my facebook like share button ..

    Then,is there any way to remove this text and button ?

    • wpbeginner says:

      @SangramKeshariPatra yes, you changed the button type from standard to button_count or box_count

  3. CorinaPopescu says:

    Another nice implementation for a Facebook Sharer you can find here:

  4. wpbeginner says:

    @hurkal Facebook is depracating the share button in favor of the like button. The like count is the same as the facebook share count.

  5. hurkal says:

    Is that still working? Share count for my site does not show the value. Is Facebook avoiding continue this work further? If so, is there a way to get latest share value?

  6. hurkal says:

    Is that still working? What happened my Facebook Share count? If Facebook is avoiding continue this work further, is there a way to get my last share count for my site?

  7. ZainabQureshi says:

    The code works really well, the only problem i see is that the count updates whenever i click on the button no matter if i have shared it previously or not.. =S is there a fix to that, that the button does not updates the count if the same person is clicking on the share button?

  8. Donald says:

    hi! This button doesn’t work well with the latest update of WordPress version anymore. Is there any alternative for this? Thanks

    • Editorial Staff says:

      Yes. Facebook has announced that the like button will eventually replace this sharer button. Because it is being used on a lot of sites, they haven’t pulled the plug yet. But it will be gone sooner or later. We recommend that you switch to using the Like button.

  9. Edward Roberts Jr says:

    I should add this button on my new blog then. Hopefully, adding this button will drive more visitor to my new blog.:) Thanks for sharing this.:)

  10. Nayan says:

    Nice Tips..

  11. Andrea says:

    I’ve tried adding the share_url parameter and still have the counter box disappearing with each page refresh.

  12. juan says:
  13. Andrea says:

    Unfortunately, I’m having the same issue as Shannon above had … it shows up only as a small button with an “F” on it. I clicked it myself and went through the steps of sharing it on Facebook and the image then changed to show a count of “1.” I then refreshed the page and it changed back to a small icon with just the “F” – no count was shown. I checked FB to ensure that it did, in fact, post to my wall.

    I copied your first set of code into my theme via OpenHook in Thesis and placed it after my posts.

    I’m not sure what is going wrong?

  14. Shannon says:

    This is not working as advertised. The button shows up but it doesn’t not display share counts after refreshing the page.

    • Editorial Staff says:

      It has been working on many sites, do not know what the issue could be with yours. We are planning on including it in our next update as well.

    • Andrea says:

      I’m having the same issue. The counter displays once clicked to share, but when you return to the page it is gone.

  15. Kelvin Servigon says:

    Great tool!

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.