Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I created a twitter button using the code and instructions here:

Here is my code

<a href="" class="twitter-share-button" data-text="The Burger Kings in Toronto at 33497 Yonge St rated 4/5 with 1 review" data-url="" data-via="mytwitteraccount" data-lang="en" data-count="vertical">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);;js.src="//";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

But the count is not updated when someone uses the button, why is that?

The page url is not exactly the data-url value I have specified it's only a short url that will redirect to the actual url which is longer.

What's the trick here? Should I use the full url or is there something else I'm missing?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

From the button FAQ:

I use a URL shortener and my count isn’t incrementing, what’s wrong?

When asking how many times a link has been Tweeted the Tweet Button uses the URL you ask it to share. If this is a shortened URL this will often return 0. This is because Tweet Button counts the final destination of the URL passed to it, not the shortened one.

If you are experiencing this problem you should use the counturl property and set it equal to the final destination of your short URL. For an example see the Tweet Button documentation.

share|improve this answer
This is what I'm using now, both data-url and data-urlcount are the same, still no count <a href=""; class="twitter-share-button" data-text="Race Car Repairs in Whitehorse at 2121 Second Ave rated " data-url=""; data-counturl=""; data-via="mydomain" data-lang="en" data-count="vertical">Tweet</a> – user893730 Feb 15 '12 at 20:58
It seems like this may not be an instant thing like fb likes, seems like twitter needs to show the tweet in search results in order for the count to work, will know by tomorrow. – user893730 Feb 15 '12 at 22:25
I confirm, it's a twitter delay issue – user893730 Feb 15 '12 at 22:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.