I’m having issues with my tweet counts staying at zero on a Drupal website.
Since the Twitter Dev site is built on Drupal, maybe a dev can clue me in.
My implementation of the tweet button uses aliased paths for the data-url and node/nodeid for data-counturl. I’m assume that by doing this that one can basically peg tweet counts to permanent url (node/nodeid), and therefore carry over tweet counts whenever a path alias changes.
Unfortunately, this doesn’t seem to work and my tweet count stays at zero. If I change the code to use node/nodeid for data-url and aliased paths for data-counturl then everything seems to work, at least until I change the alias whereby the tweet count resets to zero.
Pegging the shared url to node/nodeid works for all other share buttons except Twitter
Here’s my code:
<div> <a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php print url($_GET['q'], array('absolute' => true)); ?>" data-counturl="<?php print url($_GET['q'], array('alias' => true, 'absolute' => true)); ?>" data-count="horizontal">Tweet</a> </div>