Package net.fortytwo.twitlogic.services.twitter

Examples of net.fortytwo.twitlogic.services.twitter.TwitterCredentials


    public static void main(final String[] args) throws Exception {
        Properties props = new Properties();
        props.load(new FileInputStream(new File("/tmp/twitlogic.props")));
        TwitLogic.setConfiguration(props);

        TwitterCredentials cred = new TwitterCredentials();

        ConfigurationBuilder cb = new ConfigurationBuilder();
        cb.setDebugEnabled(true)
                .setOAuthConsumerKey(cred.getConsumerKey())
                .setOAuthConsumerSecret(cred.getConsumerSecret())
                .setOAuthAccessToken(cred.getAccessToken())
                .setOAuthAccessTokenSecret(cred.getTokenSecret());

        TwitterFactory tf = new TwitterFactory(cb.build());
        Twitter twitter = tf.getInstance();

        List<Status> statuses = twitter.getHomeTimeline();
View Full Code Here


    private final TweetStatistics statistics = new TweetStatistics();

    private final Twitter4jRateLimiter rateLimiter;

    public Twitter4jClient() throws TwitterClientException {
        TwitterCredentials cred = new TwitterCredentials();

        ConfigurationBuilder cb = new ConfigurationBuilder();
        cb.setDebugEnabled(true)
                .setOAuthConsumerKey(cred.getConsumerKey())
                .setOAuthConsumerSecret(cred.getConsumerSecret())
                .setOAuthAccessToken(cred.getAccessToken())
                .setOAuthAccessTokenSecret(cred.getTokenSecret());

        Configuration conf = cb.build();

        TwitterFactory tf = new TwitterFactory(conf);
        twitter = tf.getInstance();
View Full Code Here

TOP

Related Classes of net.fortytwo.twitlogic.services.twitter.TwitterCredentials

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.