[facebook] Is it possible to have a custom facebook like button?

Sometimes, clients want to have a custom "facebook button". I mean with a different image and design.

I used to work with sharer.php :

<a id="fb-share" style='text-decoration:none;' type="icon_link" onClick="window.open('http://www.facebook.com/sharer.php?s=100&amp;p[title]=foo&amp;p[summary]=bar&amp;p[url]=https://www.foobar.com/&amp;p[images][0]=https://www.foobar.com/thumb.gif','sharer','toolbar=0,status=0,width=580,height=325');" href="javascript: void(0)">
<img src="img/share.gif" width="62" height="18" alt="Share"/>
S</a>

But it seems it doesn't work very well since facebook has deprecated the Share button. Instead, we have to use the "like button".

So is it possible to have a custom like button with a custom image ?

I've seen on the facebook api page a generator to create the button but i would like to know if it is possible to have a custom button with a different image ?

This question is related to facebook facebook-like

The answer is


It's possible with a lot of work.

Basically, you have to post likes action via the Open Graph API. Then, you can add a custom design to your like button.

But then, you''ll need to keep track yourself of the likes so a returning user will be able to unlike content he liked previously.

Plus, you'll need to ask user to log into your app and ask them the publish_action permission.

All in all, if you're doing this for an application, it may worth it. For a website where you basically want user to like articles, then this is really to much.

Also, consider that you increase your drop-off rate each time you ask user a permission via a Facebook login.

If you want to see an example, I've recently made an app using the open graph like button, just hover on some photos in the mosaique to see it