Java examples for Social Media:Twitter
Update Twitter user profile
import twitter4j.*; import twitter4j.auth.AccessToken; public class UpdateProfile { public static void main(String[] args) { if (args.length < 4) { System.exit(0);// w ww . ja v a 2 s . c o m } Twitter twitter = new TwitterFactory().getInstance(); String consumerKey = ""; String consumerSecret = ""; String accessToken = ""; String accessTokenSecret = ""; twitter.setOAuthConsumer(consumerKey, consumerSecret); twitter.setOAuthAccessToken(new AccessToken(accessToken, accessTokenSecret)); try { twitter.updateProfile(args[0], args[1], args[2], args[3]); System.out.println(""); } catch (TwitterException te) { System.out.println(te.getMessage()); } } }