How to actually use attachment_url?

extended-tweet

#1

Hi,

Is there any documentation on how to use attachment_url? For example, how would it be used to post an extended tweet that includes a picture?

thanks!

Chris


#2

You don’t need to use attachment_url for this - the attachment (not counted in 140) is generated by adding valid media_ids to the status update request. This value is only used for DM deep links today so far as I am aware.

More broadly - we are aware that the information on this is, quite frankly, inadequate today and I personally apologise on behalf of the @TwitterDev team. The Tweet changes outlined last spring have taken a long time to work through and we had every intention of adding more detail to the docs once the extended Tweet formats were broadly available.

I’ll work to prioritise and clarify this in the coming week, but please also understand that the team is relatively small so these things sometimes take longer than we would all like to deliver. :pray:t2: Thank you all so much for your patience.


#3

Do I understand correctly that by adding media_ids to the status update request, the attached media will not count toward the 140 chars? If this is correct, does this wind up creating an extended tweet that should be retrieved via tweet_mode=extended?

Thanks again for helping to clarify this.


#4

Yes - assuming that the status text itself goes up to 140 beyond the text + t.co URL.


#5

Do you think attachment_url might in the future allow for attaching an image via a URL pointing to an image already uploaded to Twitter? This way, we could reuse images without having to upload.


#6

That’s not the current plan but I’ll pass it along to the media team.