10

Does anyone know how to change the image for the facebook like button?

I'm using the XFBML version.

<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like-box href="http://www.facebook.com/Platform" width="292" show_faces="false" stream="false" header="true">
</fb:like-box>
Tom
  • 369
  • 2
  • 6
  • 16
  • I'm pretty sure the Facebook devs are trying to make this as impossible as they can - being able to turn anything into a like button is a great way to scam innocents into clicking it. – Victor Nicollet Feb 07 '11 at 11:49
  • Another thing is that why would they loose the chance to get backlink from all of the websites? All the sites use these buttons which have the link to facebook. They load their images.. –  Jun 01 '12 at 10:51

3 Answers3

18

You simply can't (or not allowed to!). Read this answer.

Also check the Facebook Usage Guidelines, under the Facebook Like Button section (Usage tab):

While you may scale the size to suit your needs, you may not modify the Like Button in any other way (such as by changing the design).

Community
  • 1
  • 1
ifaour
  • 38,035
  • 12
  • 72
  • 79
6

I know its an old question, but you can do it if you like. Use the iframe inside a div or span tag, then put a backgroung image in the tag and make the iframe "opacity: 0", so, you can click the button, but you don´t see it. Here´s an example: Like Button with custom image

Alejandro Fiore
  • 1,117
  • 14
  • 18
5

Actually you can legally change the like button as long as you don't disguise it as something else, as confirmed by this forum post. However how to do it is a bit more tricky. Here's an example on how change it (the iframe version doesn't work on i.e.):

http://www.esrun.co.uk/blog/disguising-a-facebook-like-link/

Filipe
  • 98
  • 1
  • 2
    This is more like a hack. It's not an official way of doing it. Also I'm not sure if this is legal... – ifaour Apr 01 '11 at 10:51
  • Never mind whether this is legal or not, would you want to deceive your users like this? – Jacques Dec 10 '12 at 14:13
  • Breaking Terms of Service != Illegal ? – Mark Sep 12 '13 at 00:03
  • @Mark, equals NOT illegal? You speaking in code terms here? :p – Mike Barwick Mar 21 '14 at 04:45
  • lol it's a facebook like button ffs. There are a lot more worst things going on online (blackhat marketing) that I'm sure facebook won't just barge down on your door for using a different image as your fb like button. – AndrewL64 Jul 27 '15 at 12:34