if (args.length < 1) {
System.out.println("Usage: java twitter4j.examples.tweets.UploadMultipleImages [text] [file1] [file2] ...");
System.exit(-1);
}
try {
Twitter twitter = new TwitterFactory().getInstance();
long[] mediaIds = new long[args.length-1];
for (int i=1; i<args.length; i++) {
System.out.println("Uploading...[" + i + "/" + (args.length-1) + "][" + args[i] + "]");
UploadedMedia media = twitter.uploadMedia(new File(args[i]));