public AsyncTwitter getAsyncTwitter() {
    AsyncTwitterFactory factory = new AsyncTwitterFactory();
    AsyncTwitter asyncTwitter = factory.getInstance();

    asyncTwitter.setOAuthConsumer(
        TwitterPrivateKeyAndSecret.CONSUMER_KEY, TwitterPrivateKeyAndSecret.CONSUMER_SECRET);
    asyncTwitter.setOAuthAccessToken(loadAccessToken());

    return asyncTwitter;
  }
Пример #2
0
 public static AsyncTwitter getAsyncInstance(AccessToken token) {
   if (mAsyncTwitterFactory == null) {
     mAsyncTwitterFactory = new AsyncTwitterFactory(mConfiguration);
   }
   return mAsyncTwitterFactory.getInstance(token);
 }