O'Reilly logo

Lift Application Development Cookbook by Gilberto T. Garcia Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Signing up using a Facebook account

In this recipe, we will see how to log a user in to your application using his/her Facebook account.

Getting ready

Before being able to integrate our application with Facebook, we need to register an application on Facebook. This will give us an application identification and a secret token that will be used to identify the application requesting authorization and access to the user's data.

  1. Start a new blank project.
  2. Edit the build.sbt file by adding the following dependencies:
        "net.databinder.dispatch" %% "dispatch-core" % "0.11.0",    "com.restfb" % "restfb" % "1.6.12"
  3. Create a new app on Facebook and add its id and secret keys in the default.props file:
    facebook.app.id=<app-id>
    facebook.app.secret=<app-secret>

    Note ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required