Twitter counter no longer works

Since 20 of November 2015 the twitter button has changed. This is the new Twitter sharing button, as you can…

November 23, 2015

Since 20 of November 2015 the twitter button has changed.

This is the new Twitter sharing button, as you can see there isn’t the tweets counter:

twitter-button

Since 20 of November the old and private endpoint that were used by the official Twitter social button at the url http://urls.api.twitter.com/1/urls/count.json no longer works.

This means that you can’t see the count of Twitter shares within your site. Twitter explains that this was an hard decision, but it was necessary with the building of their new real time distributed system. As you can read in their blog post from Twitter there is also a question about the correct value of their counter:

This count does not reflect the impact on Twitter of conversation about your content — it doesn’t count replies, quote Tweets, variants of your URLs, nor does it reflect the fact that some people Tweeting these URLs might have many more followers than others.

A different point of view, from Italy (where Twitter is not so used), is that sharing numbers on Twitter are lowering every year, and this lead them to “stop” to show that numbers.

In any case I think this is not a good way, since it will brake a service used by a plenty of sites, apps, plugins and developers on any platform, and they will be angry with Twitter for this decision.

A solution for twitter count?

It really seems that the only way to get the Tweet counter for an URL is to do a search for your URL on Twitter, collect each page of results and add up the total number of tweets.

My Top Stories plugin at this moment doens’t make this work and will return a counter of 0 tweets.  If you haven’t installed the last version (I’m going to publish it now) of the plugin it will stop and the only way to fix it is disable Twitter from the settings panel.

I’m going to wait some weeks before deciding how to handle this problem in Top Stories.

FOUND SOLUTION!: How to bring back twitter counters

More technical info, and another complex solution, can be found here.

Author

I'm a software engineer, an everyday web developer and a maker. I usually build sites with PHP, within or without WordPress. I build Internet of Things with Arduino and ESP8266. I'm the founder of Rockit.it and Dailybest.it and I'm actually the Chief Technical Officer of Better Days web agency.

Recommended

Get instagram data without official api in PHP

Instagram has an official API to interact with its database of images and users. If you have enough time to…

December 3, 2013

PHP bot to get wikipedia definitions

Wikipedia, the collaborative and multilingual encyclopedia project, has a lot of usefull terms defined in its database, you can find…

August 29, 2010

Send push notification to iPhone with PHP and pushme.to

UPDATE: 2013/11/18 This code no longer works, but you can check a similar function here: Sending push notifications with php…

August 9, 2010

PHP google images mini bot

UPDATE 2013/12/12: Now, in the  Mini Bot Class there is a version of this function that is still working. You…

March 30, 2010

Ping pingomatic.com services with PHP

Ping-o-matic is a service that calls (ping) server engines and popular services to notify them that you have new contents…

February 24, 2010

Scraping content with PHP as if it was jQuery

Building a spider or a bot needs some knowledge of regular expressions, you must know and use preg_match or preg_match_all…

December 8, 2013