How to add facebook share button in magento

You can get Facebook share button from http://www.facebook.com/share/. But to add this in magento you need to get the current page url.

From the below code you can get the Current page Url in magento

<?php
echo $currUrl= $this->getUrl('').$_SERVER['REQUEST_URI'];
?>

Now Write this code into the header/footer section of your site To see the Share Button

<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php?u=<?php echo $currUrl;?>">Share</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
DOWNLOAD SOLUTION HERE