Support adding image descriptions
Twitter allows you to add descriptions (alt text) to images, to improve accessibility. It would be great if this client supported that as well.
They do not allow that from their public REST API as far as I can see, https://blog.twitter.com/2016/alt-text-support-for-twitter-cards-and-the-rest-api mentions a 1.1/media/metadata/create.json endpoint for which "documentation [...] will soon be published", but https://dev.twitter.com/rest/reference still doesn't list it.
@baedert I'm no dev, but it seems like twurl succesfully implemented it. Is that the way you can do it as well? (again: I'm no dev so I don't know whether this'll work or not) https://twittercommunity.com/t/alt-text-support-in-twurl/64391/5
Umm, I don't know if that works or not, https://dev.twitter.com/rest/reference/post/media/metadata/create looks like some unfinished placeholder site (and it even links to a chunked media upload endpoint that doesn't officially exist...?)
The twitter.com website seems to do mostly the same thing as twurl – this was POSTed to /i/media/metadata/create.json when I sent a tweet with a described image:
{"media_id":"830402076324794368","alt_text":{"text":"Two Agents Smith"}}
Same JSON as in comment #5 there (modulo whitespace).
Also, the body of the subsequent POST request to /i/tweet/create contained &has_alt_text=true (along with the media ID).
It looks like the required API is now properly documented on https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-metadata-create:
Call this endpoint to attach additional metadata such as image alt text.
POSThttps://upload.twitter.com/1.1/media/metadata/create.json{ "media_id":"692797692624265216", // image alt text metadata "alt_text": { "text":"dancing cat" // Must be <= 420 chars } }