Hi folks,

When I fetch some tweets I notice some of them are not returning the URLs object like this one: https://twitter.com/ThePracticalDev/status/1396134260961157122. The original tweet is mentioning an URL but the response object is not returning this URL at all.

Thanks in advance.

This one is returning the URL but it is not returning the image: https://twitter.com/OlufemiOTaiwo/status/1396130017776750594

How exactly are you making calls? With what parameters? I can see a url in the entities for 1396134260961157122 - are you setting the right fields? Using fields and expansions | Docs | Twitter Developer Platform

For 1396130017776750594 the image is not part of tweet metadata, the image is a card, so it’s available on the original site, in the html in <meta name="twitter:image" content="https:... tag

2 Likes

It returns the image, but the image is returning a 404. If you fetch this tweet https://twitter.com/gumroad/status/1457667967307730947, you will see this image https://pbs.twimg.com/news_img/1457576591756726274/HxYGsmbF?format=jpg&name=orig, but this image is returning a 404. Since the API returns a link for the image, I would expect it to work.

Response:

Yeah, I’m not sure why that’s coming up there because in that other tweet, the image is coming from the Card in the URL, not in the tweet, the extra json with unwound url and those images should not be there - I’ve seen this appear occasionally before, and I think this is a mistake in the API, or a new feature that’s not quite ready yet and is in testing.

1 Like