Add share on Facebook Link and buttons on your blog

by Deineshd on August 3, 2008

Share


Add Share on Facebook Link or button on your blog to make it easier for the content to be shared on Facebook.Copy and Paste the following block of codes into your blog.

Share on Facebook

<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank">Share on Facebook</a>


Share on Facebook

<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><style> html .fb_share_link { padding:2px 0 0 20px; height:16px; background:url(http://static.ak.fbcdn.net/images/share/facebook_share_icon.gif?0:26981) no-repeat top left; }</style><a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank" class="fb_share_link">Share on Facebook</a>


Share

<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><style> html .fb_share_button { display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; height:15px; border:1px solid #d8dfea; background:url(http://static.ak.fbcdn.net/images/share/facebook_share_icon.gif?0:26981) no-repeat top right; } html .fb_share_button:hover { color:#fff; border-color:#295582; background:#3b5998 url(http://static.ak.fbcdn.net/images/share/facebook_share_icon.gif?0:26981) no-repeat top right; text-decoration:none; } </style> <a href="http://www.facebook.com/share.php?u=<url>" class="fb_share_button" onclick="return fbs_click()" target="_blank" style="text-decoration:none;">Share</a>

Consider to Subscribe to our RSS feed or Follow us at Twitter or Join our Facebook Fan Page.Enter your Email below to subscribe to our updates via Email.

Enter your email address:

Delivered by FeedBurner

Similar Posts

Powered by Thesis

Thesis Theme

An amazing WordPress Theme, nothing beats the versatility and SEO friendliness of the Thesis framework.

From beginners, to the most advanced WordPress developers, Thesis makes it easy for anyone to customize it.

{ 7 comments… read them below or add one }

About Go Eggless November 21, 2008 at 11:30 pm

which one do you have here below?

Reply

Oneflores December 9, 2008 at 10:55 pm

This is great. Thanks. But where should I insert the code?

Reply

Deinesh December 10, 2008 at 3:46 am

@Oneflores

You have to insert this code in blogger HTML section.

Reply

Michael Shedlock January 30, 2009 at 9:22 am

I get this message

Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The reference to entity “t” must end with the ‘;’ delimiter.

I want the third button type above

Reply

Berna Arslan February 23, 2009 at 1:10 pm

thanks

Reply

Ethan Welhan June 4, 2009 at 5:24 pm

Thank you…

Reply

Sheri November 3, 2009 at 8:25 pm

Thanks, much better than hard-coding the url!

Reply

Leave a Comment

{ 1 trackback }

Previous post:

Next post: