Media IDs' expires_after_secs of 1 day is too short -- any way to change?


#1

We’re trying to avoid uploading images every time we respond to someone on twitter with the REST API.
We’d like to upload an image once and reuse it for more than 1 day.

Is there anyway to configure, no matter how odd or “difficult” it might be, to change the expires_after_secs/the expiration time of a media id uploaded through the REST SDK?

Thanks!


#2

No, this is not possible. I’ll pass it along but this would be a significant change to the way the API works around media.


#3

What you can do is take the media URL from the first tweet and include that in the text of followup tweets. E.g. I created one tweet with an uploaded image, I then created a second tweet that included the media URL from the first tweet.

The media URL I used can be found in the first status object similar to this

status['entities']['media'][0]['expanded_url']

and the text of the second tweet then looks like this

Kitten two https://twitter.com/devbraham/status/857281142411710466/photo/1

#4

Being able to configure the TTL would be enough


#5

This is what we’ve been doing, but we wanna it to look like it was a “native” image. And also to reclaim those 23 characters :slight_smile:


#6

On Twitter web, Twitter Mobile web, and Twitter for Android the images are displayed exactly the same.


#7

That’s true but you can’t include more than 1 if you use a link.
Also we want those 23 characters back :smiley:

Alex