Spring Security with Spring Social to access Facebook
For authentication, Spring Social uses the spring-security
API. We need to add the spring-social dependency in the pom.xml
along with with the spring-core
and spring-security
packages. In this section we shall demonstrate how Spring Social can bridge our java application to Facebook. We can log in to the Facebook application in our java application.
Once the connection is established to the social networking site, the user can post and retrieve messages from it.
We have used the same hibernate horror movie application. I have used derby database and have deployed the application on the glassfish server. Spring Social internally uses Spring's jdbctemplate
class to retrieve database information.
Getting ready
You will need to perform the following tasks to access Facebook using Spring Security with Spring Social:
Register as a Facebook developer and create an app. You will get an appID and secret key which can be used for integration
Add request...