Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To answer your specific question, you can get request (query) parameters by calling:</p> <pre><code>Controller.request().queryString() </code></pre> <p>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.</p> <p>A more step-by-step answer is that there are several steps. First, you need to get an <code>access_token</code> and then you can use it. To get an <code>access_token</code> you need to send the user to the sites authorization url, so far facebook this would be something like:</p> <pre><code>https://graph.facebook.com/oauth/authorize/?client_id=idFromFacebook&amp;redirect_uri=http://yourdomain.com/auth </code></pre> <p>Once your user has accepted the authorization, the site will redirect the user with a code, something like <code>http://yourdomain.com/auth?code=XYZ_ABC</code>. You would then need to request from the sites access token url to get the access token. For Facebook this would be something like:</p> <pre><code>https://graph.facebook.com/oauth/access_token?client_id=idFromFacebook&amp;client_secret=secredFromFacebook&amp;code=XYZ_ABC&amp;redirect_uri=... </code></pre> <p>The response from the above url would have the <code>access_token</code> in it.</p> <p>Now, you can start using the access token to request information.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload