Twitter button with count not working


#1

I’d be grateful for help fairly urgently please - I have an ordinary twitter button on a charity campaign site, but despite many tweets the count is not updating. It has been a couple days since it was live so shouldn’t be caching related.

The website is http://landfor.org. Does anyone have any suggestions?

I’ve made sure that the server supports HTTP Head requests and have tried a separately generated button here:
http://landfor.org/blah.html. All seem to remain at zero.


#2

Your shared URL is different than your destination URL, which will affect counts. Define a data-counturl attribute on the Tweet button anchor element to define URL to be used for counting purposes.
https://dev.twitter.com/web/tweet-button/parameters#share-param-counturl

A request to landfor.org is redirected across multiple domains:

  1. landfor.org
  2. bit.ly/18CymkY
  3. cqrcengage.com/actionaid/app/sign-petition?2&engagementId=82355
  4. cqrcengage.com/actionaid/app/sign-petition?0&engagementId=82355;jsessionid=

Try setting your counturl to a canonical representation of the final destination page. Setting a link canonical on the page should also help.
https://support.google.com/webmasters/answer/139066


#3

Hi Niall, thanks for your reply.

The website is usually only viewed at landfor.org except for users in the USA (redirected by IP address to a USA specific site). The USA site is a different site and the twitter share is only intended to count shares of landfor.org. The bit.ly link is used as the initial redirect as a quick solution because the link was failing to work in the redirect plugin.

Does this complicate matters? I’m not entirely sure what to try? I have already used the data-counturl parameter to http://landfor.org/ in the second test (link 2 in original post). Grateful for your advice.


#4

Are you able to serve the landfor.org page to the Twitterbot User-Agent or requests originating from Twitter IPs described by AS 13414?


#5

Hi Niall. Really appreciate your responses. You’ve helped me realise the issue was in the redirects. So I looked at whether I could stop the redirects for Twitterbot user agents as per your suggestion and found that the Geo Redirect WP plugin I’ve used enables me to add ?no_redirect to any url so I’ve added it to the data-counturl parameter with the main site URL to stop it redirecting. It is now counting the tweets. Thanks again!


#6