twitter-v2-rs
twitter-v2-rs copied to clipboard
How do I tweet with an image?
To tweet with an image, we need to follow these steps I think.
- upload the image as media
- get the uploaded media id
- 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.
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/