Package org.springframework.social.twitter.api.impl

Examples of org.springframework.social.twitter.api.impl.TwitterTemplate


    return gateway;
  }

  @Bean
  public Twitter twitter() {
    return new TwitterTemplate(env.getProperty("twitter.oauth.consumerKey"),
        env.getProperty("twitter.oauth.consumerSecret"),
        env.getProperty("twitter.oauth.accessToken"),
        env.getProperty("twitter.oauth.accessTokenSecret"));
  }
View Full Code Here


    return new ObjectToJsonTransformer();
  }

  @Bean
  public Twitter twitter() {
    return new TwitterTemplate(env.getProperty("twitter.oauth.consumerKey"),
        env.getProperty("twitter.oauth.consumerSecret"),
        env.getProperty("twitter.oauth.accessToken"),
        env.getProperty("twitter.oauth.accessTokenSecret"));
  }
View Full Code Here

public class Twitter implements ITwitter {

  private TwitterTemplate twitter;

  public Twitter(){
    twitter = new TwitterTemplateApplicationConstants.TWITTER_CONSUMER_KEY,
                    ApplicationConstants.TWITTER_CONSUMER_SECRET,
                    ApplicationConstants.TWITTER_ACCESS_TOKEN,
                    ApplicationConstants.TWITTER_ACCESS_TOKEN_SECRET);
  }
View Full Code Here

   */
  @Bean
  @Scope(value="request", proxyMode=ScopedProxyMode.INTERFACES
  public Twitter twitter() {
    Connection<Twitter> twitter = connectionRepository().findPrimaryConnection(Twitter.class);
    return twitter != null ? twitter.getApi() : new TwitterTemplate();
  }
View Full Code Here

*/
public class AbstractTwitterInboundChannelAdapterTests {

  @Test
  public void testStop() throws Exception {
    TwitterTemplate twitter = mock(TwitterTemplate.class);
    RestTemplate template = mock(RestTemplate.class);
    when(twitter.getRestTemplate()).thenReturn(template);
    final CountDownLatch latch = new CountDownLatch(1);
    AbstractTwitterInboundChannelAdapter adapter = new AbstractTwitterInboundChannelAdapter(twitter) {

      @Override
      protected void doSendLine(String line) {
View Full Code Here

      Connection<Twitter> connection = repository
          .findPrimaryConnection(Twitter.class);
      if (connection != null) {
        return connection.getApi();
      }
      return new TwitterTemplate(this.properties.getAppId(),
          this.properties.getAppSecret());
    }
View Full Code Here

 
  @Bean
  @Scope(value="request", proxyMode=ScopedProxyMode.INTERFACES
  public Twitter twitter() {
    Connection<Twitter> twitter = connectionRepository().findPrimaryConnection(Twitter.class);
    return twitter != null ? twitter.getApi() : new TwitterTemplate();
  }
View Full Code Here

TOP

Related Classes of org.springframework.social.twitter.api.impl.TwitterTemplate

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.