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.
Carry out the following steps to fetch the user's Twitter data:
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 org.scribe.model._ import net.liftweb.json.JsonParser._ import net.liftweb.json.DefaultFormats object TwitterHelper { implicit def formats = DefaultFormats val clientKey = Props.get("twitter.consumer.key").openOr("") val clientSecret ...