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.
DUDE you are the man… thx alot
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 ?
@SangramKeshariPatra yes, you changed the button type from standard to button_count or box_count
Another nice implementation for a Facebook Sharer you can find here: http://www.facebook-sharer.com
Great. Thanks.
@hurkal Facebook is depracating the share button in favor of the like button. The like count is the same as the facebook share count.
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?
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?
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?
hi! This button doesn’t work well with the latest update of WordPress version anymore. Is there any alternative for this? Thanks
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.
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.:)
Nice Tips..
I’ve tried adding the share_url parameter and still have the counter box disappearing with each page refresh.
Maybe try changing this?
http://www.facebook.com/sharer.php
to
http://www.facebook.com/sharer.php?size=large
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
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.
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?
Also having this issue on my site. Count disappears after refresh.
This is not working as advertised. The button shows up but it doesn’t not display share counts after refreshing the page.
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.
I’m having the same issue. The counter displays once clicked to share, but when you return to the page it is gone.
Great tool!