Legacy Facebook “Share” Button Codes (Bubble Count, Box Count and More)

Posted in Facebook , Web Development on 17 November 2011 9 comments

Few months ago, Facebook removed the page that allow us to generate codes for their official “Share” button. They replaced it with “Like” button instead. While “Like” button is fast and easy but we cannot add our comment along with the “Like” action. Therefore, in some cases, we still need the old Share button. Fortunately, the sharer.php still exists, so we can add the Share button using Facebook’s official script.

Here are the complete codes for all sizes of Facebook share button for those who are interested:

Box Count

Share  *count will only visible when there is at least 1 share

Codes:

<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>

Button Count

Share *count will only visible when there is at least 1 share

Codes:

<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>

Button only

Share

Codes:

<a name="fb_share" type="button" 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>

Small Icon only

Share

Codes:

<a name="fb_share" type="icon" 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>

Custom URL?

All codes above “shares” the current page. If you want to share another page or a specific page, you need to add a “share_url” attribute to the <a> tag. You need this too when you have multiple share buttons in a single page.

Example below shares our main website http://zenverse.net instead of this page.

Share

Here’s how:

<a name="fb_share" type="button_count" share_url="http://zenverse.net" 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>

Multiple Share Buttons

If you have multiple share buttons in a single page, you just need to include the <script> element once.

Hope this helps.

 

Posted by Zen on 17 November 2011 • 40,961 visits 9 comments
Tags :


or Subscribe to specific category only :




  - 9 Comments


akhil says:

Thanks a lot buddy….you really rockz….

Tim McGlover says:

Really great button I was looking for. Thanks a lot!

thanks says:

great button

Ivana T. says:

Hello. I really need your help. Never done this before. I’m trying to add share button to my page on facebook, and button shows up but nothing to share.. don’t know where exactly to copy page url in html code, or do I need to copy it at all. Pretty much confused. Could you explain it for me please, because I just can’t make it, just can’t. Thank you.

Ivana T. says:

Thank you, I got it. :D

Counter for site says:

Yeah ofcourse like button alone is not enough.For comments we need share button as well.Thanks for sharing such an informative post.

Jennifer says:

THANK YOU! I was looking for share button code for a specific URL, so that last one you added to this post helped tremendously. Thanks!

Moh shair says:

It is not working now also it is not working on you page. I remember it was working before about 2 months, now I see only ‘share’ with out count or link on it !!! any idea ??

wonderful i have been searching for this old button for a while. thanks very much.

Leave a Reply

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Previous Post
«
Next Post
»