Add to Facebook Block for Drupal

Submitted by Anonymous (not verified) on Tue, 04/20/2010 - 11:41

I know there are many modules like "service links" or social bookmarking services like addthis/sharethis etc. but I just want to have a small block on top-right side for my users with a facebook account.

$fb_title = drupal_get_title();
$fb_url = "http://".$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI];

$fb_url = rawurlencode($fb_url);
$fb_title = rawurlencode($fb_title);

$fb_url = "http://www.facebook.com/sharer.php?u=$fb_url&t=$fb_title";

echo <<

Share this page on Facebook!

hrd;
?>

Add new comment