Twitter button count not working


#1

I have applied tweet share button but counter is not incrementing, I am using below given code:

<a href="https://twitter.com/share" class="twitter-share-button">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

website url: http://www.msccruises.com/gl_en/Mobile/Homepage.aspx

a mobile user agent is required to browse website, but the URL is capable of HTTP HEAD requests:

$ curl -I http://www.msccruises.com/gl_en/Mobile/Homepage.aspx
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 32915
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 24 Jul 2012 09:46:51 GMT

where is the problem?
thanks,
Diego


#2

You’ll still need to have Tweet Button code on the page loaded by our crawler when it arrives at “http://www.msccruises.com/gl_en/Mobile/Homepage.aspx”, otherwise it has no knowledge that the Tweet Button exists on the page.


#3

I’m sorry, but I’m not sure I understand the problem. The page contains Tweet Button code.
Should I allow access to the twitter’s crawler? Can I identify the crawler via user agent?

Tthanks for your support.


#4

Ok, I solved the problem.
The steps to have a properly working Tweet button on your site are listed below:

  1. add Tweet button code to your page (https://twitter.com/about/resources/buttons)
  2. make sure the page URL is HTTP HEAD request capable (expected HTTP Response Code for HEAD request is “200 OK”)
  3. make sure the page URL is HTTP GET request capable by Twitter’s crawler. It’s possible to identify the crawler through the user agent “Twitterbot/1.0”

The last step is crucial for mobile sites which normally filter the request according to the user agent.

bye
Diego


#5

Hi Diego

Thanks for mentioning the steps.

Here is our site url on which we have added the tweet button http://www.salesgravy.com/community/videos/17027/38/what-are-discover-questions

But Diego still tweet count is not working.Please check the above link and suggest me how to fix.?

I will really appericiate you for this.

Thanks and Regards
Aman Batra


#6