I'm using tweets for drawing something that will be projected and livestreamed. Before the tweet will be projected I need to send a tweet saying something like "@somebody thank you, watch your tweet processed here :
http://livestream"
Searching tweets works well but I can't get SendDirectMessage to work
here is my test code :
Twitter myTwitter;
ConfigurationBuilder cb = new ConfigurationBuilder();
myTwitter = new TwitterFactory(cb.build()).getInstance();
try {
DirectMessage message = myTwitter.sendDirectMessage("you","thanks for your contribution");
println("message sent");
} catch (TwitterException te) {
println("message not sent");
}
I double checked my keys they seemed to be good.
Any help would be much appreciated !
Edit: After checking the dev.twitter website,
Access level is Read Only seems to be the source of my problem.
EditEdit: It still doesn't work :(
EditEditEdit: ok I moved forward by myself, found that I can print the errorMessage and see what the problem is (Wuhu! I almost feel like a real programmer!!!). I'm new to twitter so it seems you can't direct message people who aren't following you.