Hello.

Can someone tell me how to correctly render tweetbutton?

I have been fiddling around (and cache flushing) for a good 30mins and still haven't been able to make it.

This is what dev render shows me:

tweetbutton (Array, 2 elements)
    #value (String, 283 characters ) <div class="tweetbutton"><a href="http://twitte...
    #weight (String, 2 characters ) 10

And this is what I am using in my tpl code:

$tweet = tweetbutton($url);

But I can't make it work.

Any help and pointers will be greatly appreciated.

CommentFileSizeAuthor
Capture001.png6.16 KBmau.ferrusca
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mau.ferrusca’s picture

I believe the anwer to my question is here:

http://www.jerryjr.com/tags/twitter-button-drupal

jonhattan’s picture

Version: 6.x-1.4 » 7.x-2.x-dev
Status: Active » Fixed
Issue tags: -code, -drupal_render

In drupal 7 it is something like (untested):

$uri = entity_uri('node', $node);
$options = array(
  'url' => url($uri['path'], array('absolute' => TRUE)),
);

print theme('tweetbutton_tweet_display', array('options' => $options));

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.