繁体   English   中英

Twitter4j:身份验证凭据(https://dev.twitter.com/pages/auth)丢失或不正确

[英]Twitter4j: Authentication credentials (https://dev.twitter.com/pages/auth) were missing or incorrect

我正在创建一个程序,使用Twitter4j API搜索具有给定关键字的推文,但是在身份验证期间出现错误:

Exception in thread "main" 401:Authentication credentials (https://dev.twitter.com/pages/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
message - Invalid or expired token.
code - 89

Relevant discussions can be found on the Internet at:
    http://www.google.co.jp/search?q=506c3b98 or
    http://www.google.co.jp/search?q=1136695b
TwitterException{exceptionCode=[506c3b98-1136695b], statusCode=401, message=Invalid or expired token., code=89, retryAfter=-1, rateLimitStatus=null, version=4.0.4}

我验证了twitter4j.properties文件中的所有令牌,并尝试了SO网站中提到的所有可能解决方案,但它们对我没有用。 我已经花了几个小时来纠正错误,但仍然不知道是什么问题?

实际的问题是,我在构建路径库中添加了Twitter4j API随附的所有jar。 我刚刚删除了除twitter4j-core-4.0.4.jar以外的所有其他jar,它起作用了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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