Closed weieast1314 closed 2 years ago
Hello,
Did you check this method ?
Hello,
Did you check this method ?
I checked it. It works normally In addition, I found that if the post request of getOAuth1AccessToken is not encrypted, the execution result is normal. I wonder why
TwitterClient twitterClient = generateTwitterClient();
RequestToken oauth1Token = new RequestToken();
oauth1Token.setOauthToken(oauth_token);
oauth1Token.setOauthTokenSecret(cacheI.get(oauth_token).toString());
log.info("oauth1Token: {}", JSONUtil.toJsonStr(oauth1Token));
String url = "https://api.twitter.com/oauth/access_token";
Map<String, String> parameters = new HashMap();
parameters.put("oauth_verifier", oauth_verifier);
parameters.put("oauth_token", oauth1Token.getOauthToken());
String stringResponse = twitterClient.getRequestHelperV1().makeRequest(Verb.POST, url, parameters, null, false, String.class).orElseThrow(NoSuchElementException::new);
Hmm honestly I didn't work at all on this use case. I just implemented the method few months ago to test it manually but I could not help you a lot. If you manage to find any solution to hesitate to explain us and submit a pull request if needed to improve the library.
Solved by #328
I'm trying to run through a proof of concept social sign in flow with Twitter using Postman, following this guide: https://developer.twitter.com/en/docs/twitter-for-websites/log-in-with-twitter/guides/implementing-sign-in-with-twitter
I'm stuck on step 3: Converting the request token to an access token
and result is: