Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how do i get my facebook like button on my website?

how do i get my facebook like button on my website?

a lot of people gave me some html codes for my iweb site, but none of them works.

Posted on Oct 26, 2011 4:40 AM

Reply
44 replies

Nov 29, 2011 8:21 PM in response to diveactive

I have added - colorscheme="dark" - to the code which is the only other option.


<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="www.amphibios-photographer.com" data-send="true" data-width="450" data-show-faces="true" colorscheme="dark"></div>

Dec 4, 2011 12:53 PM in response to sgaddum

Hi Roddy,


Thanks a lot for the code for commenting and liking button. It took me several hours before I found this post ! Thanks.


But it seems that there is a little problem for the like button. As you can see below (a screen shot for my website), when you click on like or send, the snippet seems cut and I really don't know why since in the code, there's a width section but not a height. Do you know what's the issue here?


User uploaded file


Best regards and thank you very much !


Tay

Dec 4, 2011 7:59 PM in response to WaH!

On this page I have shown a code for changing the background color of the box using CSS....


http://www.iwebformusicians.com/Search-Engine-Optimization/Facebook-Button.html


Change the style to give the box whatever height you want in pixels.


This is the CSS that changes the background to grey...


<style type="text/css">

.fb-like {

background: #E9E9E9;

padding: 0;

}

</style>


So, for a white background and some height, change it to something like this...


<style type="text/css">

.fb-like {

background: #000;

padding: 0;

/* change the value for height in px to whatever you want */

height: 100px:

}

</style>

Dec 5, 2011 1:03 PM in response to apptorial

People have been having trouble with the iframe code because it now has html entities in the links and some don't know how to convert them.


The CSS was added for a poster who needed to change the background color to suit the web page color and the one above because of a question about adding height.


The HTML5 and XFBML versions work OK if this line is changed from...


js.src="//connect.facebook.net/ ... to...

js.src="http://connect.facebook.net

Nov 23, 2012 5:08 AM in response to Roddy

Hi Roddy


sorry to bother you but I have spent hours trying to insert a Facebook button onto my iweb site to no avail. I've read you suggestions and have tried various changes but all to no avail. Really stupid question but when getting the code from Facebook do I enter my facebook page's URL or my websites url?


As you can probably tell I'm the least techi personon the planet!!!


Any help you can give would be much appreciated.


Kind regards


Donna

Dec 3, 2012 1:14 PM in response to Roddy

Hi Roddy


Sorry for the delay in replying things have gone a bit haywire with my planning application!! Hey ho!!


I followed the link that you posted above but honestly can't get it to work and my code does not look like the one that KennyfromHockley posted even if I add the http. Can I just check that it is the url for my website that I put in to get the code? What I want is a like button on my website that people can click to like us on Facebook but also if possible I would like my Facebook posts to appear as a feed on my website thus making it more current and live. Sorry for asking all these questions!


Here the code that appears when I enter my website url: www.happy-dog-holidays.co.uk/Welcome.html


The code appears as below when I add the http: bit!


<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_GB/all.js#xfbml=1";

fjs.parentNode.insertBefore(js, fjs);

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


<div class="fb-like" data-href="http://www.happy-dog-holidays.co.uk/Welcome.html" data-send="true" data-width="450" data-show-faces="true"></div>


Like Kenny I get a huge box appearing but then nothing when I publish the site! I'm probably being very stupid but would appreciate any help you can give.


Much appreciated


Donna

Dec 3, 2012 2:04 PM in response to donnaclark200

Here's how it looks on an iWeb page.


http://home.wyodor.net/demoos/facebook/Facebook.html


This is the HTML widget iWeb creates :


http://home.wyodor.net/demoos/facebook/Facebook_files/widget0_markup.html


And this is a plain page with your code :


http://wyodor.net/_Demo/Facebook/dog.html


Look at the source of both pages.


When you click the like link a message appears in the timelime of the facebook page.


The code is copy/pasted from the facebook like button page. Simple as that.

Dec 3, 2012 2:20 PM in response to Wyodor

Sorry Wyodor but I am clearly a cretin as I can't get these buttons to appear when I copy the code I posted above!


I dragged the html widget onto the home page then pasted the code as above into the black box that appears above the html box. I pressed apply at which point the clear box becomes enourmous but I carried on and published the site. It goes through all that then you look at the live website and there's nothing there!!!


Where am I going wrong?!!!

how do i get my facebook like button on my website?

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