facebook like button

facebook like button

Recently I added Facebook Like Button to my website so thought of sharing the process of how to add Facebook ‘LIKE’ button on a website.There are two methods by which you can add Facebook Like Button to your website.First is by using iframe and second is by using XFBML.If you want to add Like button via iframe, copy and paste the below code :


<iframe src=”http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=standard&show_faces=false&width=450&action=recommend&colorscheme=light” scrolling=”no” frameborder=”0″ allowTransparency=”true” style=”border:none; overflow:hidden; width:450px; height:60px”></iframe>

If you wish to use XFBML use the below code :

<script src=”http://connect.facebook.net/en_US/all.js#xfbml=1″></script><fb:like show_faces=”true” width=”450″></fb:like>

For more information on Facebook Like button, Click here.After adding Facebook Like button, it is very important to gain insight into it; how many people sharing it etc.To get insights into Facebook like Button, goto Facebook Insight and Click on ‘Insights for your domain’ button at top-right side.Enter your domain name and copy the meta tag shown there.Add this meta tag to your header file.Within few minutes Facebook Like button insights will be available to you.I believe using this method is far better than using some plugins which  result in slowing down your webpage load speed.Try this and do share your experience.

Popularity: 11%

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Set your Twitter account name in your settings to use the TwitterBar Section.

Switch to our mobile site