当我尝试通过Streaming访问Twitter数据时,我收到以下错误。我不确定它的根本原因。我正在使用Filechannel从Twitter下载数据。
16/08/03 11:15:00 ERROR twitter.TwitterSource: Exception while streaming tweets
404:The URI requested is invalid or the resource requested, such as a user, does not exist.
Unknown URL. See Twitter Streaming API documentation at htp://dev.twitter.com/pages/streaming_api
Relevant discussions can be found on the Internet at:
htp://www.google.co.jp/search?q=ec814753 or
htp://www.google.co.jp/search?q=0a74cca1
TwitterException{exceptionCode=[ec814753-0a74cca1], statusCode=404, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.6}
at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:185)
at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65)
at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:93)
at twitter4j.TwitterStreamImpl.getSampleStream(TwitterStreamImpl.java:160)
at twitter4j.TwitterStreamImpl$4.getStream(TwitterStreamImpl.java:149)
at twitter4j.TwitterStreamImpl$4.getStream(TwitterStreamImpl.java:147)
at twitter4j.TwitterStreamImpl$TwitterStreamConsumer.run(TwitterStreamImpl.java:426)
16/08/03 11:15:00 INFO twitter4j.TwitterStreamImpl: Establishing connection.
16/08/03 11:15:01 INFO twitter4j.TwitterStreamImpl: 404:The URI requested is invalid or the resource requested, such as a user, does not exist.
Unknown URL. See Twitter Streaming API documentation at htp://dev.twitter.com/pages/streaming_api
16/08/03 11:15:01 INFO twitter4j.TwitterStreamImpl: Waiting for 20000 milliseconds
16/08/03 11:15:21 ERROR twitter.TwitterSource: Exception while streaming tweets
404:The URI requested is invalid or the resource requested, such as a user, does not exist.
Unknown URL. See Twitter Streaming API documentation at htp://dev.twitter.com/pages/streaming_api
Relevant discussions can be found on the Internet at:
htp://www.google.co.jp/search?q=ec814753 or
htp://www.google.co.jp/search?q=0a74cca1
TwitterException{exceptionCode=[ec814753-0a74cca1], statusCode=404, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.6}
at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:185)
at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65)
at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:93)
at twitter4j.TwitterStreamImpl.getSampleStream(TwitterStreamImpl.java:160)
at twitter4j.TwitterStreamImpl$4.getStream(TwitterStreamImpl.java:149)
at twitter4j.TwitterStreamImpl$4.getStream(TwitterStreamImpl.java:147)
at twitter4j.TwitterStreamImpl$TwitterStreamConsumer.run(TwitterStreamImpl.java:426)
16/08/03 11:15:21 INFO twitter4j.TwitterStreamImpl: Establishing connection.
16/08/03 11:15:23 INFO twitter4j.TwitterStreamImpl: 404:The URI requested is invalid or the resource requested, such as a user, does not exist.
Unknown URL. See Twitter Streaming API documentation at htp://dev.twitter.com/pages/streaming_api
16/08/03 11:15:23 INFO twitter4j.TwitterStreamImpl: Waiting for 40000 milliseconds
答案 0 :(得分:0)
您需要在开始水道之前验证以下字段
TwitterAgent.sources.Twitter.consumerKey =
TwitterAgent.sources.Twitter.consumerSecret =
TwitterAgent.sources.Twitter.accessToken =
TwitterAgent.sources.Twitter.accessTokenSecret =
凭据可能已过期。重新生成访问令牌,然后重试。