play-facebook is a Play Framework archetype providing basic Facebook authentication mechanics. It integrates Facebook Login into Secure module infrastructure. Hence, if you are familiar with Secure module, you can directly bootstrap your own Facebook Login integrated application.
- Checkout the play-facebook sources and do
play deps
. - Edit
FBOAuth
variable inapp/controllers/Security.java
according to your Facebook Application credentials. (Doesn't have one yet?) - Do
play run
.
You don't need any other extra configurations. Just start using @With(Secure.class)
and/or @Check("admin")
annotations within your controller classes.
As a side node, all login failures will be redirected to Application.index()
. You can alter this behaviour by editing the views/login.html
.