Hi,
I have a Spring based J2EE project which should be the bacend for several Facebook apps. Now it is works with only one Facebook app. In the XML config there is:
How should I modify my config to works with multiple Facebook AppId/AppSecret pairs not just with one?Code:<bean id="connectionFactoryLocator" class="org.springframework.social.connect.support.ConnectionFactoryRegistry"> <aop:scoped-proxy proxy-target-class="false" /> <property name="connectionFactories"> <list> <bean class="org.springframework.social.facebook.connect.FacebookConnectionFactory"> <constructor-arg value="${facebook.clientId}" /> <constructor-arg value="${facebook.clientSecret}" /> </bean> </list> </property> </bean> <bean id="usersConnectionRepository" class="org.springframework.social.connect.jdbc.JdbcUsersConnectionRepository"> <constructor-arg ref="dataSource" /> <constructor-arg ref="connectionFactoryLocator" /> <constructor-arg ref="textEncryptor" /> <property name="tablePrefix" value="test_" /> </bean>
Site setups contains the specific appId and appSecrets so we know at runtime from the Site which appId we should use for creating the Facebook connection, just how can we solve the inserting into userconnection and other things around the multiple nost just one application problem?
The config must be XML based in this project. I think in the userconnection SQL table we have to add an extra column: appId because the standard userconnection table works with just one app.


Reply With Quote
