How to add a Facebook Like button to a website

The "Like" button is becoming very popular in many more places than just Facebook. I envision that next year the Like button will drive a greater part of the search engine ranking algorithms. Why approximate which order sites should be ranked in, when you have the power of crowds to do this work for you.

Facebook is powering this feature in many places, and providing insights back to users about how many others like the same page, and potentially even their names or faces if you are currently logged in with google.

The code looks something like below. You need to replace the last part of the SRC below with your own URL. However, if you already have a facebook page with plenty of fans, we would really encourage you to use that URL instead, so that you are capturing all your fans in one place..  You might also like to change the style sizes to suit your website, otherwise the code is very easily reusable for any URL, even if you don't have a facebook account yourself...

Example Code

<div><iframe scrolling="no" frameborder="0" src="https://www.facebook.com/widgets/like.php?href=https://www.facebook.com/webwgt" style="border: none; width: 160px; height: 40px;"></iframe></div>

Example Output

Posted: Wednesday 1 December 2010

Comments

  • how do I actually do this - I tried to copy and paste the example code above (using my facebook page username instead of webwgt) on to my website's homepage, but it didn't work - only put up a tiny picture of the facebook frame. Please help?
    Posted: 2012-04-02 17:06    


>Home >About Us >Our Blog >How to add a Facebook Like button to a website