Connecting to Facebook
Facebook allows access to a user account through an OAuth workflow; from our web application, the user is redirected to a Facebook page to authorize our Facebook app to access his/her account. The user is then redirected back to our web application. In this recipe, we'll implement this OAuth workflow.
Getting ready
You need an existing Facebook app. Refer to the Creating a Facebook app and Creating a test Facebook app and test users recipes.
We will use a JSP so make sure that the Maven dependency for JSTL is declared in your pom.xml
file and the corresponding ViewResolver
bean is declared in your Spring configuration class. For more details, refer to the Using a JSP view recipe in the Chapter 3, Using Controllers and Views ...
Get Spring Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.