use of org.springframework.social.twitter.connect.TwitterConnectionFactory in project nixmash-blog by mintster.
the class SocialConfig method addConnectionFactories.
@Override
public void addConnectionFactories(ConnectionFactoryConfigurer cfConfig, Environment env) {
cfConfig.addConnectionFactory(new TwitterConnectionFactory(appSettings.getTwitterAppId(), appSettings.getTwitterAppSecret()));
cfConfig.addConnectionFactory(new FacebookConnectionFactory(appSettings.getFacebookAppId(), appSettings.getFacebookAppSecret()));
cfConfig.addConnectionFactory(new GoogleConnectionFactory(appSettings.getGoogleAppId(), appSettings.getGoogleAppSecret()));
}
use of org.springframework.social.twitter.connect.TwitterConnectionFactory in project FuryViewer by TheDoctor-95.
the class SocialConfiguration method addConnectionFactories.
@Override
public void addConnectionFactories(ConnectionFactoryConfigurer connectionFactoryConfigurer, Environment environment) {
// Google configuration
String googleClientId = environment.getProperty("spring.social.google.client-id");
String googleClientSecret = environment.getProperty("spring.social.google.client-secret");
if (googleClientId != null && googleClientSecret != null) {
log.debug("Configuring GoogleConnectionFactory");
connectionFactoryConfigurer.addConnectionFactory(new GoogleConnectionFactory(googleClientId, googleClientSecret));
} else {
log.error("Cannot configure GoogleConnectionFactory id or secret null");
}
// Facebook configuration
String facebookClientId = environment.getProperty("spring.social.facebook.client-id");
String facebookClientSecret = environment.getProperty("spring.social.facebook.client-secret");
if (facebookClientId != null && facebookClientSecret != null) {
log.debug("Configuring FacebookConnectionFactory");
connectionFactoryConfigurer.addConnectionFactory(new FacebookConnectionFactory(facebookClientId, facebookClientSecret));
} else {
log.error("Cannot configure FacebookConnectionFactory id or secret null");
}
// Twitter configuration
String twitterClientId = environment.getProperty("spring.social.twitter.client-id");
String twitterClientSecret = environment.getProperty("spring.social.twitter.client-secret");
if (twitterClientId != null && twitterClientSecret != null) {
log.debug("Configuring TwitterConnectionFactory");
connectionFactoryConfigurer.addConnectionFactory(new TwitterConnectionFactory(twitterClientId, twitterClientSecret));
} else {
log.error("Cannot configure TwitterConnectionFactory id or secret null");
}
// jhipster-needle-add-social-connection-factory
}
use of org.springframework.social.twitter.connect.TwitterConnectionFactory in project syndesis by syndesisio.
the class TwitterCredentialProviderFactory method createCredentialProvider.
static CredentialProvider createCredentialProvider(final SocialProperties properties) {
final TwitterConnectionFactory twitter = new TwitterConnectionFactory(properties.getAppId(), properties.getAppSecret());
final OAuth1Applicator applicator = new OAuth1Applicator(properties);
applicator.setConsumerKeyProperty("consumerKey");
applicator.setConsumerSecretProperty("consumerSecret");
applicator.setAccessTokenSecretProperty("accessTokenSecret");
applicator.setAccessTokenValueProperty("accessToken");
return new OAuth1CredentialProvider<>("twitter", twitter, applicator);
}
use of org.springframework.social.twitter.connect.TwitterConnectionFactory in project dubion by valsamiq.
the class SocialConfiguration method addConnectionFactories.
@Override
public void addConnectionFactories(ConnectionFactoryConfigurer connectionFactoryConfigurer, Environment environment) {
// Google configuration
String googleClientId = environment.getProperty("spring.social.google.client-id");
String googleClientSecret = environment.getProperty("spring.social.google.client-secret");
if (googleClientId != null && googleClientSecret != null) {
log.debug("Configuring GoogleConnectionFactory");
connectionFactoryConfigurer.addConnectionFactory(new GoogleConnectionFactory(googleClientId, googleClientSecret));
} else {
log.error("Cannot configure GoogleConnectionFactory id or secret null");
}
// Facebook configuration
String facebookClientId = environment.getProperty("spring.social.facebook.client-id");
String facebookClientSecret = environment.getProperty("spring.social.facebook.client-secret");
if (facebookClientId != null && facebookClientSecret != null) {
log.debug("Configuring FacebookConnectionFactory");
connectionFactoryConfigurer.addConnectionFactory(new FacebookConnectionFactory(facebookClientId, facebookClientSecret));
} else {
log.error("Cannot configure FacebookConnectionFactory id or secret null");
}
// Twitter configuration
String twitterClientId = environment.getProperty("spring.social.twitter.client-id");
String twitterClientSecret = environment.getProperty("spring.social.twitter.client-secret");
if (twitterClientId != null && twitterClientSecret != null) {
log.debug("Configuring TwitterConnectionFactory");
connectionFactoryConfigurer.addConnectionFactory(new TwitterConnectionFactory(twitterClientId, twitterClientSecret));
} else {
log.error("Cannot configure TwitterConnectionFactory id or secret null");
}
// jhipster-needle-add-social-connection-factory
}
Aggregations