redouane59 / twittered

Twitter API client for Java developers
Apache License 2.0
236 stars 64 forks source link

Can't V2 send Tweet with pictures? #332

Closed UoUoio closed 2 years ago

UoUoio commented 2 years ago

Because my developer account only supports V2 API, when I call "twitterClient.uploadMedia ()", I will be prompted that I don't have permission to use this API. So I can't get the mediaId normally. I asked the relevant staff in the community, and they said that "the create tweet in v2 to post the tweet and attach the image" could be used to realize it. I studied for a day, but I couldn't find the relevant method in the project ... My English is poor, and I don't know if I misunderstood it. I'm really sorry to disturb you.

redouane59 commented 2 years ago

Hey,

Please check the following example : https://github.com/redouane59/twittered/blob/develop/src/test/java/io/github/redouane59/twitter/nrt/ITwitterClientV2AuthenticatedTest.java#L271

UoUoio commented 2 years ago

Thank you! ! !