Am trying to create a share button for individual posts, i tried to this script and it doesn't fetch the actual URL while sharing. Do you have any suggestions on using Yoast variables inside template
<a class="snippet-facebook snippet-share" href="javascript:void(0)" onclick="facebook('<strong>http://www.dreamstopixels.com/%postname%/</strong>', 'Cookbooks', 'Easy JavaScript', '<?php echo $url ?>');"></a>