[development] Facebook like button count problem with drupal?

nan wich nan_wich at bellsouth.net
Thu Jan 20 19:32:09 UTC 2011


Aries, that would be fine if it was a node display, but wouldn't work on a View.
 
Nancy
 
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.




________________________________
From: Fehér János <feher.janos at mindworks.hu>
To: development at drupal.org
Sent: Thu, January 20, 2011 2:16:47 PM
Subject: Re: [development] Facebook like button count problem with drupal?


Hi Rajat,

You can use this in node.tpl.php and page-node.tpl.php files:

<?php echo url('node/'. $node->nid, array('absolute' => TRUE)); ?>


This prints out the url of the node in absolute form (beginning with http:)

Bests,
Aries

2011/1/20 Rajat Arora <arora271 at yahoo.com>

Hi List, 
>
>
>I am facing an issue with the implementation of Facebook like button on my 
>website. Here is quick summary of Issue:
>
>
>The like button is inserted for different pages which are shown after making a 
>filter search on website. The problem is that, the like button increase the 
>count for whole website instead of that particular page where the "like" button 
>is pressed. It is always counting the likes for the server “abc.com” instead of 
>calculating for different pages where the like button is pressed. 
>
>
>Here is the code snippet used for implementation:
> 
>Code: 
> 
><div class="facebook_button">
> {php}
> function fetch_url() {
> $curURL="http://%22.$_SERVER%5B'];
>return $curURL;
>}
>{/php}
> 
><iframesrc="http://www.facebook.com/plugins/like.php?href=%7Bphp} echo 
>urlencode(fetch_url()); 
>{/php}&layout=button_count&show_faces=true&width=110&action=like&colorscheme=light&height=20&locale=de_DE"
> scrolling="no" frameborder="0" style="border:none; overflow:hidden; 
>width:110px; height:20px;" allowTransparency="true"></iframe>
> 
>
>
>I don't know if anyone faces this issue before, but i cannot find 
>anything relevant in the older posts.  
>
>Best Regards,
>Rajat Arora
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110120/581a12b6/attachment-0001.html 


More information about the development mailing list