Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Can't get Twitter4j example work #20

Closed
thaerlabs opened this Issue · 3 comments

4 participants

Thaer Abbas Kevin Oliver Jordi Aranda Chris Aniszczyk
Thaer Abbas

I'm getting this error

Exception in thread "pool-3-thread-1" java.lang.NoSuchMethodError: twitter4j.json.JSONObjectType.determine(Ltwitter4j/internal/org/json/JSONObject;)Ltwitter4j/json/JSONObjectType;
at com.twitter.hbc.twitter4j.BaseTwitter4jClient.processMessage(BaseTwitter4jClient.java:157)
at com.twitter.hbc.twitter4j.BaseTwitter4jClient.parseMessage(BaseTwitter4jClient.java:138)
at com.twitter.hbc.twitter4j.BaseTwitter4jClient$1.run(BaseTwitter4jClient.java:81)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)

Kevin Oliver
Collaborator

Are you compiling and running it as described in the readme?

[hbc]$ mvn compile && mvn exec:java -pl hbc-example -Dconsumer.key=XYZ -Dconsumer.secret=SECRET -Daccess.token=ABC -Daccess.token.secret=ABCSECRET
Jordi Aranda

Hi there,

I also experienced this issue @thaer249. Which version of Twitter4j are you using? With 2.2.6 it should work.

Yours,

Chris Aniszczyk
Owner

For folks who are using Twitter4J 3.0+ there's a hbc-twitter4j-v3 module for the time being. For versions below that, folks should use the hbc-twitter4j module.

Chris Aniszczyk caniszczyk closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.