Open shai-almog opened 1 year ago
Hey @shai-almog , if I remember well, the getRequestHelperV2() is using oAuth2 (with token), and V1 is not.
What do you mean exactly by without elevated permission ? You want to use the credentials of another user than your own account ?
No. I mean this
Oh OK, so you mean that with an essential account the method is not working right ?
Yes.
It looks like the essential account doesn't support the oAuth 1.0a
Maybe we should implement something related to OAuth 2.0 with PKCE. Honestly I'm not expert about that, if you think that you could develop it, I can try to help you.
You can also check the Oauth2PKCETest
class.
I worked with OAuth but I can't say I'm deeply familiar with the nuances. I'll try to look into it.
Ok feel free to submit a pull request :)
I'm trying to post a tweet without the elevated permissions and getting an error since 1.x isn't supported. Looking at the code I see this line: https://github.com/redouane59/twittered/blob/develop/src/main/java/io/github/redouane59/twitter/TwitterClient.java#L803
I tried to change
getRequestHelper()
instead ofgetRequestHelperV1()
. But this won't work sincepostRequestWithBodyJson
is V1 specific so I guess we need something different here.I tried doing something similar to:
But it seems wrong.
It seems a bit unclear when V1 is used and when V2 is used. I'd be happy to submit a PR to the readme if I understood that logic.