It would be great if instead of inserting into node content you could create a Tweet Button Block. Then you could place the button where ever you want in your design.


sw3b’s picture

I agree with you, that's the first thing i look, and it was not there ! Nice feature to have !

For me to have the block, i put this code in a new block. Do forget to use php-filter when you create the new block.

<a href="<?php $node = node_load(arg(1)); print $node->path; ?>" class="twitter-share-button" data-count="horizontal" data-via="your-twitter-username" data-lang="fr">Tweet</a><script type="text/javascript" src=""></script>

You have to adjust your-twitter-username and to meet your requirements.

chia’s picture

Right now module doesn't implement hook_block.
Read my comment on how you can add to your custom page or add that code in a custom block

alltooeasy’s picture

Okay trying to don this for D7. Having some issues. Not sure where I've gone wrong.

yaworsk’s picture

Worked for me on D7, thanks for sharing this. As an aside, I also changed horizontal to vertical to change the look and people may want to change the language from french (fr) to english (en).