Package twitter4j.media

Examples of twitter4j.media.ImageUpload.upload()


        Configuration conf = cb.setMediaProvider(MediaProvider.TWITTER.name()).build();

        // ImageUploadオブジェクトの生成
        ImageUpload imageUpload = new ImageUploadFactory(conf).getInstance();

        imageUpload.upload("plucial-image", inputStream, msg);
    }

    /**
     * 承認情報の生成
     * @param userModel
View Full Code Here


        }
        try {
            ImageUpload upload = new ImageUploadFactory().getInstance(MediaProvider.TWIPPLE);
            String url;
            if (args.length >= 2) {
                url = upload.upload(new File(args[0]), args[1]);
            } else {
                url = upload.upload(new File(args[0]));
            }
            System.out.println("Successfully uploaded image to Twipple at " + url);
            System.exit(0);
View Full Code Here

            ImageUpload upload = new ImageUploadFactory().getInstance(MediaProvider.TWIPPLE);
            String url;
            if (args.length >= 2) {
                url = upload.upload(new File(args[0]), args[1]);
            } else {
                url = upload.upload(new File(args[0]));
            }
            System.out.println("Successfully uploaded image to Twipple at " + url);
            System.exit(0);
        } catch (TwitterException te) {
            te.printStackTrace();
View Full Code Here

        }
        try {
            ImageUpload upload = new ImageUploadFactory().getInstance(MediaProvider.YFROG);
            String url;
            if (args.length >= 2) {
                url = upload.upload(new File(args[0]), args[1]);
            } else {
                url = upload.upload(new File(args[0]));
            }
            System.out.println("Successfully uploaded image to YFrog at " + url);
            System.exit(0);
View Full Code Here

            ImageUpload upload = new ImageUploadFactory().getInstance(MediaProvider.YFROG);
            String url;
            if (args.length >= 2) {
                url = upload.upload(new File(args[0]), args[1]);
            } else {
                url = upload.upload(new File(args[0]));
            }
            System.out.println("Successfully uploaded image to YFrog at " + url);
            System.exit(0);
        } catch (TwitterException te) {
            te.printStackTrace();
View Full Code Here

        }
        try {
            ImageUpload upload = new ImageUploadFactory().getInstance(MediaProvider.IMG_LY);
            String url;
            if (args.length >= 2) {
                url = upload.upload(new File(args[0]), args[1]);
            } else {
                url = upload.upload(new File(args[0]));
            }
            System.out.println("Successfully uploaded image to img.ly at " + url);
            System.exit(0);
View Full Code Here

            ImageUpload upload = new ImageUploadFactory().getInstance(MediaProvider.IMG_LY);
            String url;
            if (args.length >= 2) {
                url = upload.upload(new File(args[0]), args[1]);
            } else {
                url = upload.upload(new File(args[0]));
            }
            System.out.println("Successfully uploaded image to img.ly at " + url);
            System.exit(0);
        } catch (TwitterException te) {
            te.printStackTrace();
View Full Code Here

        try {
            Configuration conf = new ConfigurationBuilder().setMediaProviderAPIKey(args[0]).build();
            ImageUpload upload = new ImageUploadFactory(conf).getInstance(MediaProvider.TWITPIC);
            String url;
            if (args.length >= 3) {
                url = upload.upload(new File(args[1]), args[2]);
            } else {
                url = upload.upload(new File(args[1]));
            }
            System.out.println("Successfully uploaded image to Twitpic at " + url);
            System.exit(0);
View Full Code Here

            ImageUpload upload = new ImageUploadFactory(conf).getInstance(MediaProvider.TWITPIC);
            String url;
            if (args.length >= 3) {
                url = upload.upload(new File(args[1]), args[2]);
            } else {
                url = upload.upload(new File(args[1]));
            }
            System.out.println("Successfully uploaded image to Twitpic at " + url);
            System.exit(0);
        } catch (TwitterException te) {
            te.printStackTrace();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.