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.

<?php
$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 <<<hrd

Share this page on <a href="
$fb_url"><b>Facebook!</b></a>

hrd;
?>

Add new comment