Skip to content

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

@tuying

Description

@tuying

使用网上给的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);

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions