WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
  • Deals
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Tutorials» Official Facebook Share Count Button for your WordPress

Official Facebook Share Count Button for your WordPress

Last updated on June 21st, 2012 by Editorial Staff
851 Shares
Share
Tweet
Share
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="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" 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="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" 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.

851 Shares
Share
Tweet
Share
Popular on WPBeginner Right Now!
  • Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

  • How to Properly Move Your Blog from WordPress.com to WordPress.org

  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

About the Editorial Staff

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

The Ultimate WordPress Toolkit

23 Comments

Leave a Reply
  1. sendbad says:
    Mar 15, 2013 at 8:26 pm

    DUDE you are the man… thx alot

    Reply
  2. SangramKeshariPatra says:
    Oct 31, 2011 at 4:43 am

    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 ?

    Reply
    • wpbeginner says:
      Oct 31, 2011 at 7:57 am

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

      Reply
  3. CorinaPopescu says:
    Sep 9, 2011 at 10:49 am

    Another nice implementation for a Facebook Sharer you can find here: http://www.facebook-sharer.com

    Reply
    • Andrew says:
      Feb 5, 2014 at 3:54 am

      Great. Thanks.

      Reply
  4. wpbeginner says:
    Jul 29, 2011 at 8:31 pm

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

    Reply
  5. hurkal says:
    Jul 29, 2011 at 5:56 pm

    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?

    Reply
  6. hurkal says:
    Jul 29, 2011 at 5:51 pm

    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?

    Reply
  7. ZainabQureshi says:
    Jun 7, 2011 at 11:11 am

    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?

    Reply
  8. Donald says:
    Apr 14, 2011 at 2:55 am

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

    Reply
    • Editorial Staff says:
      Apr 15, 2011 at 10:32 am

      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.

      Reply
  9. Edward Roberts Jr says:
    Apr 11, 2011 at 12:39 pm

    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.:)

    Reply
  10. Nayan says:
    Dec 1, 2010 at 7:54 am

    Nice Tips..

    Reply
  11. Andrea says:
    Nov 3, 2010 at 11:27 am

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

    Reply
  12. juan says:
    Aug 24, 2010 at 1:19 pm

    Maybe try changing this?

    http://www.facebook.com/sharer.php

    to

    http://www.facebook.com/sharer.php?size=large

    Reply
    • juan says:
      Aug 24, 2010 at 1:34 pm

      That is wrong, It is because it needs to bee shared in order for the box to come up.
      Add this
      share_url=”((your Page))”
      To

      and share it. see if the box comes up

      Reply
      • Editorial Staff says:
        Aug 25, 2010 at 4:09 am

        You shouldn’t need to have to do this because of the canonical URL system built-in to WordPress, but if you must, you can add that.

        Reply
  13. Andrea says:
    May 24, 2010 at 10:12 pm

    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?

    Reply
    • Bri says:
      May 27, 2010 at 10:27 am

      Also having this issue on my site. Count disappears after refresh.

      Reply
  14. Shannon says:
    Nov 4, 2009 at 12:32 pm

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

    Reply
    • Editorial Staff says:
      Nov 4, 2009 at 5:14 pm

      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.

      Reply
    • Andrea says:
      Nov 3, 2010 at 11:22 am

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

      Reply
  15. Kelvin Servigon says:
    Nov 2, 2009 at 9:16 am

    Great tool!

    Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 600,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
WPForms Logo
WPForms
Drag & Drop WordPress Form Builder Plugin. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 25 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2018 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2018)
    • Which is the Best WordPress Slider? Performance + Quality Compared
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • 5 Best VPN Services for WordPress Users (Compared)
    • HostGator Review - An Honest Look at Speed & Uptime (2018)
    • SiteGround Reviews from 1032 Users & Our Experts (2018)
    • Bluehost Review from Real Users + Performance Stats (2018)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Start a Podcast with WordPress (Step by Step)
    • How to Choose the Best Domain Name (8 Tips and Tools)
    • How to Setup a Professional Email Address with Google Apps and Gmail
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2018 – Step by Step Guide
Deals & Coupons (view all)
Soliloquy Logo
Soliloquy Coupon
Get 10% off Soliloquy, the best responsive WordPress slider plugin available in the market.
iPage Coupon
Get over 83% off on iPage web hosting and a free domain name.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • List25
  • Awesome Motive
  •  

Copyright © 2009 - 2018 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

WordPress hosting by HostGator | WordPress CDN by MaxCDN | WordPress Security by Sucuri.