问题
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