This sample application demonstrates how to use Spring Security 5’s OAuth 2 client support to login with Facebook and consume the Facebook API using the access token obtained during login.
You will need to register an application with Facebook (at https://developers.facebook.com/) and edit src/main/resources/application.yml, entering your application’s client ID and secret.