Tweet button count apearing only sometimes


#1

Hello!

I have a problem with the Tweet Button on my blog.

I have it added to the main index page using this code:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="<?php the_permalink() ?>" count="horizontal" data-via="ICED_CHAI">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

For some posts it shows the count correctly but for others it is stuck on “0” even thoguh when I click on the “0” number next to the button it shows me the list of tweets that have been posted.

Example of the count at “0” even thought there were 3 tweets on the post: http://www.icedchai.com/countries/our-night-climb-and-the-sunrise-at-mt-sinai/

Example of the count working fine: http://www.icedchai.com/photography/photos-luxor-temple-at-night/

I will really appreciate any help!!
Pawel


#2

The count is based off of HTTP HEAD requests. A quick way to test this is to run "curl -I " from a linux or mac command line. I noticed that most of your time your site returns a 403 Forbidden:

$ curl -I http://www.icedchai.com/countries/our-night-climb-and-the-sunrise-at-mt-sinai/ HTTP/1.1 403 Forbidden Date: Thu, 13 Oct 2011 16:42:31 GMT Server: Apache Accept-Ranges: bytes Vary: Accept-Encoding,User-Agent Content-Type: text/html $ curl -I http://www.icedchai.com/photography/photos-luxor-temple-at-night/ HTTP/1.1 403 Forbidden Date: Thu, 13 Oct 2011 16:43:48 GMT Server: Apache Accept-Ranges: bytes Vary: Accept-Encoding,User-Agent Content-Type: text/html

One strange thing was that one request actually did succeed:

$ curl -I http://www.icedchai.com/photography/photos-luxor-temple-at-night/
HTTP/1.1 200 OK
Date: Thu, 13 Oct 2011 16:42:45 GMT
Server: Apache
X-Pingback: http://www.icedchai.com/xmlrpc.php
Link: http://www.icedchai.com/?p=1425; rel=shortlink
Vary: Cookie,Accept-Encoding,User-Agent
Expires: Thu, 13 Oct 2011 17:42:46 GMT
Pragma: public
Cache-Control: public, must-revalidate, proxy-revalidate
Etag: 94826e9e09d5862ddab7a3b2f89692ad
X-Powered-By: W3 Total Cache/0.9.2.4
Last-Modified: Thu, 13 Oct 2011 16:42:46 GMT
Content-Type: text/html; charset=UTF-8

The inconsistent counts are probably a result of your server returning random success / failure messages in response to HEAD requests.


#3