Package org.springframework.social.facebook.connect

Examples of org.springframework.social.facebook.connect.FacebookConnectionFactory


   * @see FacebookConnectionFactory
   */
  @Bean
  public ConnectionFactoryLocator connectionFactoryLocator() {
    ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry();
    registry.addConnectionFactory(new FacebookConnectionFactory(facebookClientId, facebookClientSecret));
    return registry;
  }
View Full Code Here


  @Inject
  private DataSource dataSource;

  @Override
  public void addConnectionFactories(ConnectionFactoryConfigurer cfConfig, Environment env) {
    cfConfig.addConnectionFactory(new FacebookConnectionFactory(env.getProperty("facebook.appKey"), env.getProperty("facebook.appSecret")));
  }
View Full Code Here

  private DataSource dataSource;

  @Override
  public void addConnectionFactories(ConnectionFactoryConfigurer cfConfig, Environment env) {
    cfConfig.addConnectionFactory(new TwitterConnectionFactory(env.getProperty("twitter.appKey"), env.getProperty("twitter.appSecret")));
    cfConfig.addConnectionFactory(new FacebookConnectionFactory(env.getProperty("facebook.appKey"), env.getProperty("facebook.appSecret")));
    cfConfig.addConnectionFactory(new LinkedInConnectionFactory(env.getProperty("linkedin.appKey"), env.getProperty("linkedin.appSecret")));
  }
View Full Code Here

  //
 
  @Override
  public void addConnectionFactories(ConnectionFactoryConfigurer cfConfig, Environment env) {
    cfConfig.addConnectionFactory(new TwitterConnectionFactory(env.getProperty("twitter.appKey"), env.getProperty("twitter.appSecret")));
    cfConfig.addConnectionFactory(new FacebookConnectionFactory(env.getProperty("facebook.appKey"), env.getProperty("facebook.appSecret")));
    cfConfig.addConnectionFactory(new LinkedInConnectionFactory(env.getProperty("linkedin.appKey"), env.getProperty("linkedin.appSecret")));
  }
View Full Code Here

import org.springframework.social.security.provider.OAuth2AuthenticationService;

public class FacebookAuthenticationService extends OAuth2AuthenticationService<Facebook> {

  public FacebookAuthenticationService(String apiKey, String appSecret) {
    super(new FacebookConnectionFactory(apiKey, appSecret));
  }
View Full Code Here

  public FacebookAuthenticationService(String apiKey, String appSecret) {
    super(new FacebookConnectionFactory(apiKey, appSecret));
  }

  public FacebookAuthenticationService(String apiKey, String appSecret, String appNamespace) {
    super(new FacebookConnectionFactory(apiKey, appSecret, appNamespace));
  }
View Full Code Here

  private static final String CLIENT_SECRET = "888e92659dae96040216a257576b092a";
  private static final String SIGNED_REQUEST = "T4PCp840PHnhgQwMgCSZODpDGqhLC4mFGaNG8oHW7WU.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTMzNTg5NDc5NiwidXNlciI6eyJjb3VudHJ5IjoidXMiLCJsb2NhbGUiOiJlbl9VUyJ9LCJ1c2VyX2lkIjoiNzM4MTQwNTc5In0";

  @Test
  public void disconnect() throws Exception {
    FacebookConnectionFactory connectionFactory = new FacebookConnectionFactory("clientId", CLIENT_SECRET);
    Connection<Facebook> connection = connectionFactory.createConnection(new ConnectionData("facebook", "738140579", "", "", "", "", "", "", null));
    StubUsersConnectionRepository usersConnectionRepository = new StubUsersConnectionRepository();
    ConnectionRepository connectionRepository = usersConnectionRepository.createConnectionRepository("habuma");
    connectionRepository.addConnection(connection);
    assertEquals(1, connectionRepository.findAllConnections().size());
    DisconnectController controller = new DisconnectController(usersConnectionRepository, CLIENT_SECRET);
View Full Code Here

TOP

Related Classes of org.springframework.social.facebook.connect.FacebookConnectionFactory

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.