Add a "Share on Facebook" Link in Your Blog

Facebook is very popular social networking. It allow you to share your link with your friends and members of group you have joined. If you have network of friends on facebook, you should add "Share on Facebook" link to your blog.

How to create a "Share on Facebook" link in your blog hosted in blogger :

Go to your blog layout and edit HTML. Enable "Expand Widget Templates" and then find the following code :

"<data:post.body/>"

Now add the following code below the above code :

<b:if cond='data:post.url'>
<br/>share on: <a expr:href='"http://www.facebook.com/share.php?u=" + data:post.url'>facebook</a>

How to add a "Share on Facebook" link in your wordpress blog :

Login to your admin panel and open single.php file using theme editor. Add the following code :

<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>" target="blank">Share on Facebook</a>

When a user clicks on the link to add it, it will show up on their profile home page and to their news feeds. Someone visit your profile may visit the link if found interesting.


0 comments: