Tuesday 16 August 2011

Add Facebook share button (popup)


In order to make a shared button popup instead of it opening in a popup window you need to replace you 'a' tag with the follow:

<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u=http:www.jiggyape.com','sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a rel="nofollow" href="http://www.facebook.com/share.php?u=<;url>" onclick="return fbs_click()" target="_blank">Share on Facebook</a>

replace the url after 'u=' with the url you want to share:

u=http:www.jiggyape.com'


No comments:

Post a Comment