Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

申请完应用后获取authUrl提示密钥不对 #32

Open
tuying opened this issue Dec 13, 2021 · 0 comments
Open

申请完应用后获取authUrl提示密钥不对 #32

tuying opened this issue Dec 13, 2021 · 0 comments

Comments

@tuying
Copy link

tuying commented Dec 13, 2021

使用网上给的key和密钥没有问题,自己申请的就报错;
org.scribe.exceptions.OAuthException: Response body is incorrect. Can't extract token and secret from this

static final EvernoteService EVERNOTE_SERVICE = EvernoteService.SANDBOX;

Class<? extends EvernoteApi> providerClass = EvernoteApi.Sandbox.class;
if (EVERNOTE_SERVICE == EvernoteService.PRODUCTION) {
providerClass = org.scribe.builder.api.EvernoteApi.class;
}
OAuthService service = new ServiceBuilder()
.provider(providerClass)
.apiKey(CONSUMER_KEY)
.apiSecret(CONSUMER_SECRET)
.callback(cbUrl)
.build();

    Token requestToken = service.getRequestToken();
    String oauthToken = requestToken.getToken();
    String oauthTokenSecret = requestToken.getSecret();
    String authUrl = service.getAuthorizationUrl(requestToken);
    System.out.println(authUrl);

是现在不能申请了应用了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant