Closed (works as designed)
Project:
Drupal core
Version:
5.7
Component:
theme system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2013 at 22:05 UTC
Updated:
7 Mar 2013 at 00:03 UTC
I have a theme file named profiles.tpl.php that styles a page like this: http://www.pointsincase.com/user/6320
On the list of new columns for the user, I want to dynamically generate the raw number of Facebook total share/like counts next to the date. For instance "Feb 22, 2013 | 24 Likes on Facebook".
This is how the code currently looks:
$columns .= '<div class="clear"></div><div class="profarticle">' . $img . '<font size="3">' . l($node->title, 'node/' . $node->nid) . '</font><div style="line-height:65%;"><br></div><font style="font-size:85%">' . $node->content . '</font><br/><font style="font-size:80%" color="#757575"><em>' .
'' . format_date($node->created, 'custom', 'M j, Y') . '</em></font><br /></div><hr size="1" color="#D0D0D0" style="margin-top: 10px; margin-bottom: 10px;">';
Can anyone help me insert the correct code in there to output the Facebook total share/like count?
I am aware of the following code available from Facebook available for such a request:
$facebook->api_client->fql_query('SELECT total_count FROM link_stat WHERE url="YOUR_SHARE_URL"');
...but I don't know if more code is needed to define "$facebook", or what code to replace "YOUR_SHARE_URL" to generate each full node URL.
Comments
Comment #1
dudycz commentednot an issue for Drupal Core