Facebook custom share button

Here is en example code on how to make a custom facebook share button.

Code:

<script>function fbs_click() {u=location.href;t=document.title;window.open(‘https://www.facebook.com/sharer.php?u=’+encodeURIComponent(u)+’&t;=’+encodeURIComponent(t),’sharer’,’toolbar=0,status=0,width=626,height=436′);return false;}</script><a href=’https://www.facebook.com/share.php?u=<url>’ onclick=’return fbs_click()’ target=’_blank’><img src=’SOURCE_TO_YOUR_IMAGE’ alt=’facebook’ title=’Share on facebook’ /></a></script>

Leave a Comment