How can I add a facebook "like" button to my website?

I just got the like botton code from facebook developer, but don't know where to drop it in iWeb. I would like the like button to appear in the contact page of my website: gingerbirdstore.com

Please help to get this working.

Thank you

iMac5,1, Mac OS X (10.5.8)

Posted on Dec 11, 2011 12:41 PM

Reply
9 replies

Dec 11, 2011 5:19 PM in response to Old Toad

Thank you Old Toad! But unfortunately it did not work!

I copied and pasted the HTML code from the FB developers, into the HTML snippet of iWeb as per your instructions but it does not applied the code to any of my pages on iWeb.

This is the first of 2 codes FB gives to be applied after the opening <dody> tag

Do you know where is the <body> tag on iWeb? https://developers.facebook.com/docs/reference/plugins/like/


<div id="fb-root"></div>

<script>(function(d, s, id) {

var js, fjs = d.getElementsByTagName(s)[0];

if (d.getElementById(id)) return;

js = d.createElement(s); js.id = id;

js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";

fjs.parentNode.insertBefore(js, fjs);

}(document, 'script', 'facebook-jssdk'));</script>


This is the second code to be applied whenever you want the plugin to appear on the iWeb page.


<div class="fb-like" data-href="https://www.facebook.com/gingerbirstore" data-send="true" data-width="450" data-show-faces="true"></div>


Do you know any other method to get a like button to work on iWeb?

The method you discribe worked for tweeter and other buttons but not for FB.


Thanks,

Dec 11, 2011 5:29 PM in response to gingerbird123

add the following into html snippet and click apply button:


<div id="fb-root"></div>

<script>(function(d, s, id) {

var js, fjs = d.getElementsByTagName(s)[0];

if (d.getElementById(id)) return;

js = d.createElement(s); js.id = id;

js.src = "http://connect.facebook.net/en_US/all.js#xfbml=1";

fjs.parentNode.insertBefore(js, fjs);

}(document, 'script', 'facebook-jssdk'));</script>


<div class="fb-like" data-href="https://www.facebook.com/gingerbirstore" data-send="true" data-width="450" data-show-faces="true"></div>

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I add a facebook "like" button to my website?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.