Downloads
This is just a few lines of code that you can place in your product tpl.php files to create a "Share on Facebook" link. Facebook makes a link readily available on their website, but pages with that link inserted do not validate. I am running D6 but I see no reason why this wouldn't work on D5.
<?php $your_current_url = "http://" .$_SERVER['HTTP_HOST'] .$_SERVER['REQUEST_URI']; ?>
<?php print '<a rel="nofollow" href="http://www.facebook.com/sharer.php?u=' . $your_current_url .'&t=' . $node->title . '" title="Share this product on Facebook">Share on Facebook</a>'?></p>One note, this will only pass the node title (generally the name of the product) to Facebook. If you want to include your site's name, you can do it right before the $node->title variable. For example:
<?php
$your_current_url = "http://" .$_SERVER['HTTP_HOST'] .$_SERVER['REQUEST_URI'];
?><?php
print '<a rel="nofollow" href="http://www.facebook.com/sharer.php?u=' . $your_current_url .'&t=YOURSITESNAME - ' . $node->title . '" title="Share this product on Facebook">Share on Facebook</a>'
?>


