This is what I did (for Evolution). Of course, there might be a better way of doing this but it works for me!
Create a chunk called
shareFacebook or whatever you want to call it, and paste in the following:
<a href="http://www.facebook.com/sharer.php?u=[[PageUrl?id=`[*id*]`]]&t=[*pagetitle:uri*]" onclick="javascript:window.open('http://www.facebook.com/sharer.php?u=[[PageUrl?id=`[*id*]`]]&t=[*pagetitle:uri*]','','width=700,height=400'); return false">Share</a>
Create the following snippet:
PageUrl (gets and encodes the current page url)
<?php
$url = urlencode($modx->makeUrl($id, '', '', 'full'));
return $url;
?>
Now add {{shareFacebook}} wherever you want the share link to appear in your page template.
You can add a class to the link and style it with an icon if you want.
Note: facebook is discouraging continued use of the share button as they want people to ’like’ things instead. But ’share’ certainly makes more sense in some instances.