Twitter4j Error
in
Contributed Library Questions
•
2 years ago
I keep getting this error that says "cannot convert from Twitter to Twitter" when I try to run this:
try{
Twitter twatter = new TwitterFactory().getInstance(); //this is where the error occurs
twatter.setOAuthConsumer("W........Q", "I........g");
RequestToken requestToken = twitter.getOAuthRequestToken();
AccessToken accessToken = null;
Query query = new Query("source: twitter4j yusukey");
QueryResult result = twittersearch(query);
for (Tweet tweet : result.getTweets()){
System.out.println(tweet.getFromUser() + ":" + tweet.getText());
}
}
catch(TwitterException te){
println("Couldn't connect: " + te);
}
}
how can I fix this? I'm just trying to run some sample codes from the twitter4j website, but it doesn't work?
Thanks
1