Example usage for twitter4j.conf PropertyConfiguration OAUTH_CONSUMER_SECRET

List of usage examples for twitter4j.conf PropertyConfiguration OAUTH_CONSUMER_SECRET

Introduction

In this page you can find the example usage for twitter4j.conf PropertyConfiguration OAUTH_CONSUMER_SECRET.

Prototype

String OAUTH_CONSUMER_SECRET

To view the source code for twitter4j.conf PropertyConfiguration OAUTH_CONSUMER_SECRET.

Click Source Link

Usage

From source file:org.springframework.social.showcase.twitter.connect.TwitterServiceProvider.java

License:Apache License

@Override
public Twitter getApi(String accessToken, String secret) {
    Properties props = new Properties();
    props.setProperty(PropertyConfiguration.OAUTH_CONSUMER_KEY, getConsumerKey());
    props.setProperty(PropertyConfiguration.OAUTH_CONSUMER_SECRET, getConsumerSecret());
    props.setProperty(PropertyConfiguration.OAUTH_ACCESS_TOKEN, accessToken);
    props.setProperty(PropertyConfiguration.OAUTH_ACCESS_TOKEN_SECRET, secret);
    Configuration conf = new PropertyConfiguration(props);
    return new TwitterFactory(conf).getInstance();
}

From source file:org.springframework.social.showcase.twitter.Twitter4JServiceProvider.java

License:Apache License

@Override
protected Twitter getApi(String consumerKey, String consumerSecret, String accessToken, String secret) {
    Properties props = new Properties();
    props.setProperty(PropertyConfiguration.OAUTH_CONSUMER_KEY, consumerKey);
    props.setProperty(PropertyConfiguration.OAUTH_CONSUMER_SECRET, consumerSecret);
    props.setProperty(PropertyConfiguration.OAUTH_ACCESS_TOKEN, accessToken);
    props.setProperty(PropertyConfiguration.OAUTH_ACCESS_TOKEN_SECRET, secret);
    Configuration conf = new PropertyConfiguration(props);
    return new TwitterFactory(conf).getInstance();
}