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

Fetching a user's Facebook data

In the previous recipe, we learned how to log a user in using his/her Facebook account. Now, we will learn how to download more information about the user from Facebook, such as the user's friends.

Getting ready

You can modify the previous recipe's project or duplicate it so that you can keep both versions at hand.

How to do it...

A user's Facebook data can be fetched by carrying out the following steps:

  1. Modify the signup method on the FacebookDispatcher object as follows:
     def signup(): Box[LiftResponse] = { val scope = ("email" :: "friends_about_me" :: Nil).mkString(",") val fbUrl = :/("www.facebook.com").secure / "dialog" / "oauth" <<? ("client_id", facebookAppId) :: ("redirect_uri", "http://localhost:8080/fb/callback") ...

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