I wrote this simple code that works just fine :
//access the twitter API using your twitter4j.properties file
Twitter twitter = TwitterFactory.getSingleton();
//create a new search
Query query = new Query("\"your welcome\"");
//get the results from that search
QueryResult result = twitter.search(query);
//get the first tweet from those results
Status tweetResult = result.getTweets().get(0);
//reply to that tweet
StatusUpdate statusUpdate = new StatusUpdate("[email protected]" + tweetResult.getUser().getScreenName() +" I believe you meant \"you're\" here?");
Status status = twitter.updateStatus(statusUpdate);
The problem is, even using my own parametres (Acessstoken, Consumerkey,,) that I generated manually from app.twitter.com, the code still sends the tweet to this account : Twit4j . it seems that too many had tweeted through it too!
twitter4j.proprieties is set up correctly
libs are correctly integrated
anyone knows what could be wrong ?
The Problem were (I guess) in the class name! the package name+ my class name are "Twitter" and the Object name from the Twitter4j is "Twitter" too! think the IDE got confused maybe ? anyway now it works just fine !