Friday, May 13, 2011

Create a “Share on Facebook” Button for Your WordPress Blog

I will show you how you can add a “Share on Facebook” button in your WordPress blog to bring in more visitors. This is very simple, just like the Twitter button tutorial.
Open your single post file (single.php) file from your theme directory and insert the following code within the loop:
Share on Facebook
To make things more interesting, you can use getTinyUrl() function to send a short URL to Facebook:
< ?php $turl = getTinyUrl(get_permalink($post->ID)); ?>
Share on Facebook
That’s it! Now your readers will able to share your posts in their Facebook. This is a great way to boost your site’s traffic!

No comments:

Post a Comment