簡體   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