Twitter share button not counting tweets. Please help


#1

Hi,

I am having a problem with the counter not counting. I have no idea what I could be doing wrong, but my counter stays at 0, even though I have used it a couple of times to do some testing.

Here is the code:

<a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://www.kalamonsoft.com/gp7" data-url="http://www.kalamonsoft.com/gp7" data-text="G+7 - live feed of updates from your Google+ friends on your Windows desktop" data-count="horizontal" data-via="kalamonsoft">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

The problem is not caching, as the counter has stayed at zero for two weeks or more (yes, the button was used during that time).

The script is on this page: http://www.kalamonsoft.com/gp7


#2

There are times where the tweet counting mechanisms of the Tweet Button can miss some tweets, but something does seem stubborn about this URL. I’ll file a bug with the team.


#3

Hi @kalamon,

In this case we don’t have a count for you because the server you’re running does not accept HTTP HEAD requests, which is currently required for proper Tweet Button counting functionality.


#4

Hi @episod,

My server is Google Apps Engine. I guess I have to add some implementation. What should be the response to the HEAD request that will satisfy the tweet button?

@kalamon


#5

Hi @episod,

I have implemented handling HEAD requests. Curl says this:

C:\Users\kalamon\Desktop\curl-7.21.7-win64-ssl-sspi>curl -I http://www.kalamonsoft.com/dbjr HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 Cache-Control: no-cache Expires: Fri, 01 Jan 1990 00:00:00 GMT Vary: Accept-Encoding Date: Thu, 22 Sep 2011 07:23:29 GMT Server: Google Frontend Transfer-Encoding: chunked

Nevertheless, the counter is still at zero, even though I have used it a while ago. Is there anything else I have to add?

@kalamon


#6

oh, it started counting now :slight_smile: - apparently it needed some time to wake up :slight_smile:


#7

We’ve had similar issues on our website (www.atlassian.com), using multiple configurations of the Tweet Button code. I’ve filed two support tickets ( #173633 and #4027376) about our issues and not received any repeatable solutions.

Most recently, we’ve had a helluva time getting the dynamic counter to work on this page (http://www.atlassian.com/en/communication-through-the-ages-infographic). Following the format on this documentation page (https://dev.twitter.com/docs/tweet-button), this is what our code currently looks like:

  • The code was stuck at 0 for weeks (we know the button was used, as clicking on the glaring 0 count revealed multiple tweets), and then eventually moved up to 2 where it’s been stuck for another week. The support guy I was in touch with suggested something about URL caching of the Tweet Button, but I haven’t gotten any answers there. We’ve tried a half-dozen configurations on this page, so I imagine that may be presenting some problems.

    Help please? :slight_smile:


    #8

    Looks like the URL you’re linking to doesn’t support HEAD requests:

    $ curl -I http://www.atlassian.com/en/communication-through-the-ages-infographic HTTP/1.1 403 Forbidden Date: Thu, 22 Sep 2011 23:08:58 GMT Server: Apache-Coyote/1.1 Content-Type: text/html;charset=UTF-8 Content-Length: 964 Vary: Accept-Encoding

    #9

    Glad to hear it, @kalamon!


    #10

    I realized that this requirement wasn’t really expressed that clearly in the documentation, so I added some info to the FAQ: https://dev.twitter.com/docs/tweet-button/faq#count-api-increment


    #11

    THANK YOU for looking into this @kurrik. I’ll have our web developer add the HEAD requests (I’m only a feeble marketing guy), and will report back.


    #12

    Atlassian uses Google Apps Engine for its website?


    #13

    My tweets stopped counting about a week ago. I use a WordPress plugin (Digg Digg). I moved to a new server in that week. Could it be the HEAD requests you talk about or a cache problem. How do i rectify this-http://alltopstartups.com.

    Thanks


    #14

    my tweet button is not counting too … how can i solve this problems.
    here is link to my website … http://diamonddiscus.com/chello

    thanks in advance.


    #15

    It looks like the count is going up on that page


    #16

    Hello guys,

    I’m having the same issue here:
    http://www.doodlersanonymous.com/2012-calendar/

    The twitter buttons work on the other pages, just fine and that URL does give me a HTTP 200 response when I do a HTTP head request.

    Any ideas what is going on?

    Thanks in advance.


    #17

    Did this ever get resolved? I no longer see the button on that page.


    #18

    I’ve got a strange issue slash question: will the twitter counts ever increment if my URLs are hash-based?

    For example, take the URL http://www.daytrotter.com/#!/live/
    That has been tweeted multiple times today, but the count is still zero. I’ve tried the HTML5 version of the button and the iframe version of the button, but all the counts remain zero.

    Perhaps, because you can’t make a HEAD request of a hashed page the counts will forever remain zero?

    Thank you verrily!


    #19

    We have problem with the following URLs where we have inserted the twitter_share button
    however we have noticed that those buttons are stuck with the same value they had 24 hours ago.

    Any ideas?
    http://elrincondeendesa.pe/nota2011/proyectoarboleda/
    http://elrincondeendesa.pe/nota2011/proyectolaronda/
    http://elrincondeendesa.pe/nota2011/proyectobibliotecas/
    http://elrincondeendesa.pe/nota2011/proyectofamiliares/


    #20

    One thought is that you’re inserting the URL in data-text, data-url, and data-counturl. You should try removing the URL from data-text (it doesn’t need to be included in the Tweet body) and the URL you have for data-url does not need to be %-encoded.

    data-text="¿Y cuál es tu nota? - Arboleda de colores [http://elrincondeendesa.pe/nota2011/proyectoarboleda/] #nota2011 #Endesa" data-url="http%3A%2F%2Felrincondeendesa.pe%2Fnota2011%2Fproyectoarboleda%2F" data-counturl="http://elrincondeendesa.pe/nota2011/proyectoarboleda/"