我们可以在同一个项目中使用 twitter4j.FilterQuery 和 twitter4j.RateLimitStatus [英] Can we use twitter4j.FilterQuery and twitter4j.RateLimitStatus in a same project

查看:21
本文介绍了我们可以在同一个项目中使用 twitter4j.FilterQuery 和 twitter4j.RateLimitStatus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 Twitter Stream API 和 Twitter 用户搜索做一个小应用程序时,我必须使用twitter4j.FilterQuery 和 twitter4j.RateLimitStatus 类.

While doing a small application with Twitter Stream API and Twitter user search I have to use twitter4j.FilterQuery and twitter4j.RateLimitStatus classes.

这两个类位于两个不同的 jar 中:

These two classes are found in two different jar:

twitter4j-core-2.2.6.jar
twitter4j-core-3.0.3.jar

当我将这两个分类添加到我的类路径中时,我收到以下异常:

When I add these two classed into my class path i am getting the below exception:

Exception in thread "Twitter4J Async Dispatcher[0]" java.lang.NoSuchMethodError: twitter4j.json.JSONObjectType.determine(Ltwitter4j/internal/org/json/JSONObject;)Ltwitter4j/json/JSONObjectType;
    at twitter4j.AbstractStreamImplementation$1.run(AbstractStreamImplementation.java:100)
    at twitter4j.internal.async.ExecuteThread.run(DispatcherImpl.java:116)

请帮助我如何理解出了什么问题.

Please help me how to understand what is going wrong.

推荐答案

为什么不使用 twitter4j 的最新版本 3.0.5.它可靠且运行良好.

Why don't you use the latest version of twitter4j that is 3.0.5. It is reliable and working pretty good.

这篇关于我们可以在同一个项目中使用 twitter4j.FilterQuery 和 twitter4j.RateLimitStatus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆