twitter-v2-rs icon indicating copy to clipboard operation
twitter-v2-rs copied to clipboard

How do I tweet with an image?

Open eightfx opened this issue 2 years ago • 1 comments

To tweet with an image, we need to follow these steps I think.

  1. upload the image as media
  2. get the uploaded media id
  3. call the TwitterApi::~~~~.post_tweet().add_media(my_media_id).send()

I do not know how to do step 1 - 2.

Thanks for your help.

eightfx avatar Feb 19 '23 03:02 eightfx

You need to upload the image with API v1.

Wrote a blog post here (although sample code is in Golang): https://julianyap.com/posts/2024-03-13-1710365831/

jyap808 avatar May 13 '24 19:05 jyap808