Salam & hello to all my dearest reader, Muralidharan Gopal asked me how I put a tiny facebook likes icon at the end of my blog entry which any logged facebook user can simply click the likes button from my blog entry if they like it and automatically appear in their facebook profile.

Firstly go to facebook developers section – like button then you will see a description and few notes about this code. Simply put all the details as you wish and leave the “url to like” blank and click Get Codes. Then a pop-up appear as follow.

<iframe src=”http://www.facebook.com/plugins/like.php?href=vangardx.net%2Fblog&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80″ scrolling=”no” frameborder=”0″ style=”border:none; overflow:hidden; width:450px; height:80px;” allowTransparency=”true”></iframe>

Then replace the bold and italic code as shown.

<iframe src=”http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(‘http://’.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']) ?>&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80″ scrolling=”no” frameborder=”0″ style=”border:none; overflow:hidden; width:450px; height:80px;” allowTransparency=”true”></iframe>

And now you can copy and paste it in single_post.php or any other places. Is it help?

Credit to : Slaven

Related Posts Plugin for WordPress, Blogger...