简体   繁体   中英

oauth_problem=consumer_key_rejected using Scribe library

I registed for a Yahoo Messenger SDK api and plugged-in the consumer key/sercret into this code:

https://github.com/fernandezpablo85/scribe-java/blob/master/src/test/java/org/scribe/examples/YahooExample.java

However, I'm getting this error:

Exception in thread "main" org.scribe.exceptions.OAuthException: Response body is incorrect. Can't extract token and secret from this: 'oauth_problem=consumer_key_rejected'
    at org.scribe.extractors.TokenExtractorImpl.extract(TokenExtractorImpl.java:41)
    at org.scribe.extractors.TokenExtractorImpl.extract(TokenExtractorImpl.java:27)
    at org.scribe.oauth.OAuth10aServiceImpl.getRequestToken(OAuth10aServiceImpl.java:52)
    at com.yahoodemo.YahooExample.main(YahooExample.java:28)

I'm pretty sure that the consumer key/secret is correct because I can get the 'RequestToken' using the same key/secret with a generic HTTP GET request.

Is this a bug in the Scribe library or it's something else?

Even i faced the same problem. But i finally found that: In developer accounts ( http://developer.apps.yahoo.com/projects ) After creating the project, Don`t forgot to give alteast one permission for the application like: Contacts - READ, Knowledge Plus- READ. Finally save

Nagendra的解决方案对我有用,但是不要忘了刷新Yahoo Project页面,因为在编辑权限后密钥和密码都被更改了。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM