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 Twitter data

In this recipe, we will go a step further and learn how to fetch the user's data from their Twitter account. Since the process of authentication is the same as in the previous section, we will focus on the things we need to do to change the project we created in the previous recipe in order to get the information we want from the user's account.

Getting ready

You can modify the project we created in the previous recipe or you can duplicate it.

How to do it...

Carry out the following steps to fetch the user's Twitter data:

  1. Create a new file named TwitterHelper.scala with the following code:
    package code.lib import net.liftweb.util.Props import org.scribe.builder.ServiceBuilder import org.scribe.builder.api.TwitterApi import ...

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