Example usage for twitter4j.conf ConfigurationContext getInstance

List of usage examples for twitter4j.conf ConfigurationContext getInstance

Introduction

In this page you can find the example usage for twitter4j.conf ConfigurationContext getInstance.

Prototype

public static Configuration getInstance() 

Source Link

Usage

From source file:cmu.edu.homework.mediaUpload.PhotoUploadFactory.java

License:Apache License

/**
 * Creates an PhotoUploadFactory with default configuration
 */
public PhotoUploadFactory() {
    this(ConfigurationContext.getInstance());
}

From source file:cmu.edu.homework.mediaUpload.VideoUploadFactory.java

License:Apache License

/**
 * Creates an VideoUploadFactory with default configuration
 */
public VideoUploadFactory() {
    this(ConfigurationContext.getInstance());
}

From source file:hashimotonet.UpdateStatus.java

License:Apache License

/**
 * Twitter?/*from w ww . j  a v  a 2s .  c  o  m*/
 * @throws TwitterException 
 */
private void connectTwitter() throws TwitterException {
    // Twitetr4j??
    Configuration conf = ConfigurationContext.getInstance();
    // OauthF?IuWFNg??
    OAuthAuthorization Oauth = new OAuthAuthorization(conf);
    // OauthF?IuWFNgconsumerKeyconsumerSecret?
    Oauth.setOAuthConsumer(Globals.KEY, Globals.SECRET);

    //       // NGXgg?[N??
    RequestToken sRequestToken = null;
    try {
        sRequestToken = Oauth.getOAuthRequestToken();
    } catch (TwitterException e) {
        throw new TwitterException(e.toString());
    }
    String url = sRequestToken.getAuthorizationURL();
    System.out.println("Url = " + url);
}

From source file:jp.typosone.android.azarashi.OAuthActivity.java

License:Apache License

/**
 * Twitter OAuth ?????????//  ww w .ja  va  2  s  .co  m
 * <p/>
 * OAuth ????? RequestToken ??
 * ????AccessToken ??????URL???????
 *
 * @see Activity#onCreate
 */
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Configuration conf = ConfigurationContext.getInstance();
    mOAuth = new OAuthAuthorization(conf);
    RequestTokenLoaderCallbacks mRequestCallbacks = new RequestTokenLoaderCallbacks();
    mAccessCallbacks = new AccessTokenLoaderCallbacks();

    getLoaderManager().initLoader(LID_REQ, null, mRequestCallbacks);
}

From source file:mx.bigdata.t4j.TwitterStreamFactory.java

License:Apache License

/**
 * Creates a TwitterStreamFactory with the root configuration.
 */
public TwitterStreamFactory() {
    this(ConfigurationContext.getInstance());
}