Package twitter4j.media

Examples of twitter4j.media.ImageUploadFactory


        ConfigurationBuilder cb = getConfigurationBuilder(userModel);

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

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

        imageUpload.upload("plucial-image", inputStream, msg);
    }
View Full Code Here


        if (args.length < 1) {
            System.out.println("Usage: java twitter4j.examples.media.TwippleImageUpload [image file path] [message]");
            System.exit(-1);
        }
        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]));
View Full Code Here

        if (args.length < 1) {
            System.out.println("Usage: java twitter4j.examples.media.YFrogImageUpload [image file path] [message]");
            System.exit(-1);
        }
        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]));
View Full Code Here

        if (args.length < 1) {
            System.out.println("Usage: java twitter4j.examples.media.ImgLyImageUpload [image file path] [message]");
            System.exit(-1);
        }
        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]));
View Full Code Here

            System.out.println("Usage: java twitter4j.examples.media.TwitpicImageUpload [API key] [image file path] [message]");
            System.exit(-1);
        }
        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]));
View Full Code Here

TOP

Related Classes of twitter4j.media.ImageUploadFactory

Copyright © 2018 www.massapicom. 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.