Can we use twitter4j.FilterQuery and twitter4j.RateLimitStatus in a same project

时光毁灭记忆、已成空白 提交于 2019-12-24 14:44:44

问题


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

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.


回答1:


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



来源:https://stackoverflow.com/questions/21263974/can-we-use-twitter4j-filterquery-and-twitter4j-ratelimitstatus-in-a-same-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!