java - Use of scope property for Facebook authentication -


I am writing a Facebook API that needs access to the user's e-mail and publishes the timeline. I get these two links:

  • I use scope and default to tell scope properties:

      org.springframework.social.facebook.security.FacebookAuthenticationService  

    But none of the two solutions are working.

    This application uses Spring-Social-Samples like the starting point:

    @configuration- Enables EnableSocial public class FacebookConfig social configurations {@ Private Data Source Data Remove source; @Override public void addConnectionFactories (ConnectionFactoryConfigurer cfConfig, Environment env) {final FacebookConnectionFactory fbcf = new FacebookConnectionFactory (env.getProperty ( "facebook.appKey"), env.getProperty ( "facebook.appSecret")); Fbcf.setScope (env.getProperty ("facebook.scope")); CfConfig.addConnectionFactory (fbcf); } / ** * Singleton Data Access Objects which provide access to connections in all * users. * / @Override public UsersConnectionRepository getUsersConnectionRepository (ConnectionFactoryLocator connectionFactoryLocator) {JdbcUsersConnectionRepository store = new JdbcUsersConnectionRepository (data source, connectionFactoryLocator, Encryptors.noOpText ()); Repository.setConnectionSignUp (new SimpleConnectionSignUp ()); Return repository; } Public User IDOSOS getUserIdSource () {Return to New User IDOS} {@ Override Public String Mill User IID ()} Return Security. Metadata user (). IID (); }}; } @ Bean @ scope (value = "request", proxymode = scoppypoxmoda.interface) Public Facebook Facebook (Connection Repository Repository) {Connection & lt; Facebook & gt; Connection = repository.findPrimaryConnection (Facebook.class); Return connection! = Null? Connection.getApi (): Zero; } @ Bean Public Canvas Signin Controller Canvas Signin Controller (Connection FiltersLocalator ConnectionFilter Logistitor, User Connection Repository Users Connection Repository, Environment NV) {New Canvas Signin Controller (Connection Faner Locator, Uses Connection Repository, New SimpleSigninAdapter (), N.G.Property ("Facebook.APK"), NV Tetter ("Facebook."), Env.getProperty ("facebook.canvasPage"));}}

    I need to Do scope to set the necessary permissions?

    class to the canvas Saininkantrolr a scope property on Facebook Used to request permissions, just set this property with valid values ​​and comes into the new world.


    Comments

    Popular posts from this blog

    import - Python ImportError: No module named wmi -

    Editing Python Class in Shell and SQLAlchemy -

    lua - HowTo create a fuel bar -