How to make a ‘share this on facebook’ link in a webpage

The title needs to be correctly url encoded.

<a target=”_blank” href=”http://www.facebook.com/sharer.php?u=http://yoururlhere/&amp;t=This+is+the+title”>Share this on facebook</a>

The ampersand “&” between the parameters is HTML encoded which is a bit fussy but correct.

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

Leave a Comment