Example usage for twitter4j.conf ConfigurationBuilder setOAuthAccessTokenURL

List of usage examples for twitter4j.conf ConfigurationBuilder setOAuthAccessTokenURL

Introduction

In this page you can find the example usage for twitter4j.conf ConfigurationBuilder setOAuthAccessTokenURL.

Prototype

public ConfigurationBuilder setOAuthAccessTokenURL(String oAuthAccessTokenURL) 

Source Link

Usage

From source file:org.structr.web.auth.TwitterAuthClient.java

License:Open Source License

@Override
protected void init(final String authorizationLocation, final String tokenLocation, final String clientId,
        final String clientSecret, final String redirectUri, final Class tokenResponseClass) {

    super.init(authorizationLocation, tokenLocation, clientId, clientSecret, redirectUri, tokenResponseClass);

    ConfigurationBuilder cb = new ConfigurationBuilder();
    cb.setOAuthAuthorizationURL(authorizationLocation);
    cb.setOAuthAccessTokenURL(tokenLocation);

    Configuration conf = cb.build();

    TwitterFactory tf = new TwitterFactory(conf);
    twitter = tf.getInstance();//  ww  w.ja  va2  s  .  c  o  m
    twitter.setOAuthConsumer(clientId, clientSecret);

}