Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitter removes share count api endpoint #46

Closed
startef opened this issue Nov 20, 2015 · 15 comments
Closed

Twitter removes share count api endpoint #46

startef opened this issue Nov 20, 2015 · 15 comments
Assignees

Comments

@startef
Copy link

startef commented Nov 20, 2015

In case not everybody is aware of it: Share counts for Twitter will stop working today.

https://blog.twitter.com/2015/hard-decisions-for-a-sustainable-platform

Currently I don't see a feasible way around it, so Twitter should probably be removed from the backend.

@liayn
Copy link
Contributor

liayn commented Nov 20, 2015

Sounds reasonable.

@craiq
Copy link

craiq commented Nov 22, 2015

whats about https://dev.twitter.com/rest/reference/get/search/tweets ?
search for the url as the query string.
Just oauth is needed, but zend framework has support for the twitter oauth.

Edit: gives max 100 tweets back... with content and meta stuff
with 450 searches per 15min you can check for up to 45k tweets.
This should be enough for most pages but generates a huge amount of traffic

@startef
Copy link
Author

startef commented Nov 22, 2015

The rest api search is limited to the last 7 days. You would have to search for the url, count the results and record the timestamp you searched and store both permanently somewhere (not in the cache). When you search a second, third, and so on time you use the timestamp to determine if a result is new and then add the amount of new results to the stored amount.

Of course this will only work for new urls. Everything that happened prior to the new system cannot be counted, so all old posts, entries, news, whatever will be zero.

http://opensharecount.com basically did exactly this, as I understood it, and provide it as a service in the old Twitter api style. Unfortunately they don't seem all too trustworthy to me. If you want to use that service for yourself (or if anyone else does), I would STRONGLY recommend to NOT use your real Twitter account for it and to NOT provide any real information while registering with this service as well as with Twitter. Just create a another Twitter account with a trash mail address and then registered with that account on opensharecount.com. They gain access to everything on that account and even can tweet in your name!

Because of all these reasons, I haven't decided yet, if I really want to add it to our WordPress plugin version of Shariff. I'm really interested though in other peoples opinions about this.

The only real way to get accurate share counts now is to pay 5000 Euros and more per month to Twitter for their Gnip apis. Don't think anybody is going to do that for some share count buttons.

@craiq
Copy link

craiq commented Nov 22, 2015

or you use this:
https://twittercommunity.com/t/is-http-urls-api-twitter-com-1-urls-count-json-a-valid-way-to-get-the-tweet-count-for-a-url/13369
but this don't fit to the shariff backend as it is
there might be services on base of this soon.

@startef
Copy link
Author

startef commented Nov 22, 2015

Did you accidentally post the wrong link or did I overlook something? The link describes the old api endpoint that Twitter just retired.

@craiq
Copy link

craiq commented Nov 22, 2015

the second and fourth post.
that you need to calculate the count yourself while getting streamed every tweet that fits the search string.
https://dev.twitter.com/streaming/reference/post/statuses/filter

@startef
Copy link
Author

startef commented Nov 22, 2015

Ah, got it. Well, like you said nothing that really fits to Shariff. Way to much traffic and you need a single account for every domain, otherwise you will run into the limits way too quickly. Maybe there will be other services like OpenShareCount in the future that are more "open" and less fishy.

@compeak
Copy link
Collaborator

compeak commented Nov 23, 2015

Twitter will be removed from the backend as soon as flattr fixes their API and Travis successfully builds this pull request.

@Tinendo
Copy link

Tinendo commented Nov 23, 2015

The only real way to get accurate share counts now is to pay 5000 Euros and more per month to Twitter for their Gnip apis. Don't think anybody is going to do that for some share count buttons.

  • startef

So, no Twitter Share Counts for 'us' in the future?

@liayn
Copy link
Contributor

liayn commented Nov 23, 2015

@Tinendo No! We have to except it. It does not help to cry after it, it's a free service, they can do what they like to do.
@compeak I already prepared the patch locally, shall I create a PR or will you do it on your own?

@compeak
Copy link
Collaborator

compeak commented Nov 23, 2015

@liayn I did it in #48. Please have a look at it and tell me if I missed something.

@liayn
Copy link
Contributor

liayn commented Nov 23, 2015

@compeak Oh, thanks for the hint, I missed that completely. Looks good. Can you release that asap, so I can release a new version of the TYPO3 Extension?
(I will come up with another PR for the composer.json in a minute)

@compeak
Copy link
Collaborator

compeak commented Nov 23, 2015

Twitter has been removed from all backends.

@compeak compeak closed this as completed Nov 23, 2015
@compeak compeak mentioned this issue Feb 2, 2016
@stefahn
Copy link

stefahn commented Jul 21, 2016

Took me some time to find this thread and learn that Twitter counts (unfortunately) are no longer available.

I suggest that this information is added to the README.md so other users don't wonder why Twitter is missing in the "Supported services". Should I add a sentence to README.md?

@compeak
Copy link
Collaborator

compeak commented Jul 21, 2016

@stefahn: No. The README clearly states which services are supported and is bundled with every release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants