Twitter4j API, problem with the updateStatus() function


#1

So I’m trying to have fun wit the twitter API, and for that i’m using the twitter4j API. But when I did the code, this error appeared, and I don’t know how to fix it. It’s not a credentials error. I did many searches on the Internet, but I can’t find a person who has the same problem as me >_<.

So here is the screenshot:


#2

Maybe catch the exception and see what the error actually is.


#3

It’s a “TwitterException” (you can see it on the screen)


#4

TwitterException is a generic class. You have to catch it and see what the errorMessage is.

http://twitter4j.org/javadoc/twitter4j/TwitterException.html


#5

Oh yes sorry, wil do it quickly


#6

I surrounded it with the try catch, and it works! Thanks for the help!


#7