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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitter badges failing Twitter API closed down? #8837

Closed
svrooij opened this issue Jan 20, 2023 · 16 comments 路 Fixed by #8842
Closed

Twitter badges failing Twitter API closed down? #8837

svrooij opened this issue Jan 20, 2023 · 16 comments 路 Fixed by #8842
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas

Comments

@svrooij
Copy link

svrooij commented Jan 20, 2023

Are you experiencing an issue with...

shields.io

馃悶 Description

As of today I noticed that several of my twitter badges are failing (yours on the home pages as well!)

Twitter closed down its api for 3rd party apps very recently, so I suspect this has something to do with it.

馃敆 Link to the badge

HTTPS://shields.io and scroll all the way down.

馃挕 Possible Solution

Suggestion is to remove all twitter things, since there probably won鈥檛 be any progression on the API part.

Or replace with: twitter for now and as fallback when json not working.

https://img.shields.io/badge/follow-%40{username}-1DA1F2?logo=twitter&style={style}
@svrooij svrooij added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Jan 20, 2023
@calebcartwright
Copy link
Member

calebcartwright commented Jan 21, 2023

Thanks for reaching out

Twitter closed down its api for 3rd party apps very recently, so I suspect this has something to do with it.

Do you have any additional info on this?

I had to dig back pretty deep into the project history to find the motivation, but turns out we are using a private/unsupported endpoint (http://cdn.syndication.twimg.com/widgets/followbutton/info.json?) to avoid the rate limit and auth requirements that are often deal breakers for the scale and model at which Shields.io operates

@regginator
Copy link

Twitter closed down its api for 3rd party apps very recently, so I suspect this has something to do with it.

Do you have any additional info on this?

Yeah, Twitter made an official announcement on this yesterday; they're completely closing down their developer API for all 3rd party clients, sadly.

Here's an article published by The Verge with more information.

turns out we are using a private/unsupported endpoint (http://cdn.syndication.twimg.com/widgets/followbutton/info.json?)

The service that's providing that endpoint in use may just have had its' Twitter-Developer-API access revoked due to this recent change.

@abstractalgo
Copy link

abstractalgo commented Jan 21, 2023

Just wanted to confirm that, indeed, Twitter badges are not working, and also found that fetch that was mentioned:

url: 'http://cdn.syndication.twimg.com/widgets/followbutton/info.json',
options: { searchParams: { screen_names: user } },

Even after a bit more digging around Internet, I haven't been able to find a different endpoint than that one that can retrieve this kind of data without any auth. 馃槙 Unfortunate.

@ghost
Copy link

ghost commented Jan 21, 2023

@Theta-Dev
Copy link

I guess the only way to obtain follower counts is the official Twitter API. And they have a fairly strict rate limit of max. 300 user lookups per 15 minutes.

https://developer.twitter.com/en/docs/twitter-api/rate-limits

I guess that shields.io is getting a lot more traffic, even if the like counts would be cached for 24h or so.

Removing the Twitter badge entirely would break existing sites, so my suggestion would be to remove the like counter and have a static badge (similar to the official one).

https://publish.twitter.com/?buttonType=FollowButton&query=%40TwitterDev&widget=Button

@chris48s
Copy link
Member

In the last 15 mins we've had over 3,000 requests on the twitter badge at the origin, (i.e: excluding those we served from downstream cache) and it is not exactly peak usage right now. We could probably cache for longer but I think we'd really struggle to stay under the rate limit for a single API key. Given the situation upstream, I'm not sure I have the inclination to invest in a token pooling solution.

I think given the twitter badge consistently ranks inside the top 10 highest traffic badges on the service, I'd agree that instead of following our usual process for deprecating/removing, we could usefully replace it with something like

Follow @fredbloggs

as a fallback. It is somewhat unusual, but so is retiring one of the highest traffic badges on the service.

I'll try and get a PR in for this tomorrow.

@svrooij
Copy link
Author

svrooij commented Jan 21, 2023

@chris48s you're right about that. Just plain removing one of the highest ranked badges might not be the best plan.

Maybe in a last ditch effort we should send Elon a message what we want and if he can facilitate?

@calebcartwright
Copy link
Member

Maybe in a last ditch effort we should send Elon a message what we want and if he can facilitate?

馃槃

We could attempt to reach out to see if they'd be willing to support some kind of increased rate limit for us, but I'm rather skeptical anything would come out of it. There's obviously... quite a bit happening at Twitter these days and with their reported focus on financials I'd be surprised if they'd be willing to do so instead of pushing us to pay for some level of access (which we don't have the spare funds for)

@VictorioMolina
Copy link

same error

@rickstaa
Copy link

In the last 15 mins we've had over 3,000 requests on the twitter badge at the origin, (i.e: excluding those we served from downstream cache) and it is not exactly peak usage right now. We could probably cache for longer but I think we'd really struggle to stay under the rate limit for a single API key. Given the situation upstream, I'm not sure I have the inclination to invest in a token pooling solution.

I think given the Twitter badge consistently ranks inside the top 10 highest traffic badges on the service, I'd agree that instead of following our usual process for deprecating/removing, we could usefully replace it with something like

Follow @fredbloggs

as a fallback. It is somewhat unusual, but so is retiring one of the highest traffic badges on the service.

I'll try and get a PR in for this tomorrow.

I think asking Twitter to increase the limit for shields.io is the right way. I, however, am surprised if they grant you that request.馃槄 We asked the same from github-readme-stats for the GraphQL API, but in the end, we have to rely on donated PAT to keep the Public Vercel instance from being Rate Limited. We loop through these PATs and move to the next one when one is rate limited in the hour (see https://github.com/anuraghazra/github-readme-stats/blob/4b173001264e9774a2179915519e6129af689625/src/common/retryer.js#L18-L61). Not the most pretty solution but it works. 馃憤

@chris48s
Copy link
Member

Just one extra note here: This endpoint has previously broken then come back a couple of days later e.g: #7698 Given the timing, I expect this is unlikely but it is also possible it could come back online on the other side of the weekend.

@NEMSLinux
Copy link

NEMSLinux commented Jan 22, 2023

In the last 15 mins we've had over 3,000 requests on the twitter badge at the origin, (i.e: excluding those we served from downstream cache) and it is not exactly peak usage right now. We could probably cache for longer but I think we'd really struggle to stay under the rate limit for a single API key. Given the situation upstream, I'm not sure I have the inclination to invest in a token pooling solution.

I think given the twitter badge consistently ranks inside the top 10 highest traffic badges on the service, I'd agree that instead of following our usual process for deprecating/removing, we could usefully replace it with something like

Follow @fredbloggs

as a fallback. It is somewhat unusual, but so is retiring one of the highest traffic badges on the service.

I'll try and get a PR in for this tomorrow.

This would be significantly better than the error message. Perhaps this could be a failover output in event that the endpoint / JSON response are bad? I'd be happy with this. +1

@svrooij
Copy link
Author

svrooij commented Jan 22, 2023

Maybe respond with
twitter

https://img.shields.io/badge/follow-%40{username}-1DA1F2?logo=twitter&style={style}

For now, ao all the badges at least show something better then json could nog be parsed.

And then maybe find a way to fix the badge after that.

@eghysut
Copy link

eghysut commented Jan 23, 2023

is work thanks you Twitter Follow

[![Twitter Follow](https://img.shields.io/badge/follow-%40RexosP-1DA1F2?logo=twitter&style=social)](https://twitter.com/RexosP)

mrz1836 added a commit to mrz1836/mrz1836 that referenced this issue Jan 23, 2023
klieret added a commit to HSF/.github that referenced this issue Jan 24, 2023
klieret added a commit to hsf-training/.github that referenced this issue Jan 24, 2023
colindean added a commit to colindean/colindean that referenced this issue Jan 24, 2023
Twitter shut down the API that shields.io uses for dynamic follower count.

See also:

* badges/shields#8837
* badges/shields#8842
rickstaa added a commit to rickstaa/rickstaa that referenced this issue Jan 24, 2023
aquint-zama added a commit to zama-ai/tfhe-rs that referenced this issue Jan 24, 2023
IceTDrinker pushed a commit to zama-ai/tfhe-rs that referenced this issue Jan 24, 2023
IceTDrinker pushed a commit to zama-ai/tfhe-rs that referenced this issue Jan 24, 2023
IceTDrinker pushed a commit to zama-ai/tfhe-rs that referenced this issue Jan 25, 2023
aquint-zama added a commit to zama-ai/concrete-numpy that referenced this issue Jan 25, 2023
japzio added a commit to japzio/japzio that referenced this issue Jan 25, 2023
umut-sahin pushed a commit to zama-ai/concrete-numpy that referenced this issue Jan 25, 2023
StevenJDH added a commit to StevenJDH/StevenJDH that referenced this issue Jan 25, 2023
LeoDog896 added a commit to LeoDog896/mermaid that referenced this issue Jan 25, 2023
(From badges/shields#8837):

The Twitter API has changed in recent days by closing support for 3rd party apps, breaking the Twitter follow count badge.
@rickstaa
Copy link

rickstaa commented Jan 25, 2023

Maybe respond with twitter

https://img.shields.io/badge/follow-%40{username}-1DA1F2?logo=twitter&style={style}

For now, ao all the badges at least show something better then json could nog be parsed.

And then maybe find a way to fix the badge after that.

Incorrect bot action, or was the badge changed to the suggestion above馃?

@svrooij
Copy link
Author

svrooij commented Jan 25, 2023

Maybe respond with twitter

https://img.shields.io/badge/follow-%40{username}-1DA1F2?logo=twitter&style={style}

For now, ao all the badges at least show something better then json could nog be parsed.

And then maybe find a way to fix the badge after that.

Incorrect bot action, or was the badge changed to the suggestion above馃?

They used my suggestion in a temp fix. Interesting discussion on wether or not to redirect the twitter badge. #8842

andycui97 added a commit to LineaLabs/lineapy that referenced this issue Jan 26, 2023
Image was broken due to badges/shields#8837 
Fixing as suggested in the thread.
dghubble added a commit to dghubble/dghubble that referenced this issue Jan 26, 2023
* Twitter badges no longer show counts, due to Twitter shutting down
3rd party API access. Although the shields.io folks are working on
a fallback, this is a good point to just drop badges or links to
Twitter, since I no longer use it
* Also remove mention of the go-twitter API, since I've deprecated
it and don't wish to highlight it anymore

Rel: badges/shields#8837
adityaraute added a commit to adityaraute/eddiejaoude that referenced this issue Jan 26, 2023
For more info, check [this](badges/shields#8837)
eddiejaoude pushed a commit to eddiejaoude/eddiejaoude that referenced this issue Apr 3, 2023
For more info, check [this](badges/shields#8837)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants