I am trying to add a few social media share buttons to a Wordpress site I am working on and am using this for Facebook:
<a href="http://www.facebook.com/sharer/sharer.php?u=<?php the_permalink();?>" title="Share on Facebook." target="_blank"><img src="/img/facebook-blue.png" alt="Share this on facebook!" /></a>
but it is not seeming to work, it produces the correct link when I inspect the code "http://www.facebook.com/sharer/sharer.php?u=http://myurl/post-name" but when I click it I get this error on Facebook:
the_permalink()
throughurlencode()
to escape special characters.) – ceejayoz