I don't know if it might help, but I've created a Play 2.x client in Scala and Java which supports OAuth/CAS/OpenID/HTTP authentication and user profile retrieval :

For OAuth support, it's based on Scribe and supports Facebook, Twitter, Google, Yahoo, DropBox, Github, LinkedIn, Windows live, WordPress...


To answer your specific question, you can get request (query) parameters by calling:


Getting OAuth2 is easy but not trivial. It helps to have a working sample. I would recommend downloading Play1, and looking up the sample for Facebook Authentication. And then porting the code over to Play2. I did the above and found the process very instructive. You will realize that each site and API has quirks/needs, so there is very little additional code that seems usable form one site to another.

A more step-by-step answer is that there are several steps. First, you need to get an access_token and then you can use it. To get an access_token you need to send the user to the sites authorization url, so far facebook this would be something like:

Once your user has accepted the authorization, the site will redirect the user with a code, something like You would then need to request from the sites access token url to get the access token. For Facebook this would be something like:

The response from the above url would have the access_token in it.

Now, you can start using the access token to request information.

Related Query

More Query from same tag