Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't know why the <em>Authenticated Referrals</em> approach is not working for you, but here's how you can ask for the <em>email</em> address and get it in 2 other ways (you'll need to deactivate the authenticated referrals though):</p> <p>(1) <a href="http://developers.facebook.com/docs/authentication/server-side/" rel="nofollow">Serveri-Side Authentication</a> - When facebook load your canvas page it's doing that by POSTing to your canvas url, providing the *signed_request* parameter. With that you can check if the user is authenticated or not (if he is, you get the access token and other things about the user such as his fb user id). If the user is not authenticated you send him to the following url:</p> <pre><code>https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&amp;redirect_url=YOUR_REDIRECT_URI&amp;scope=email,publish_stream,etc </code></pre> <p>When the user gets back you should have an authenticated signed request.</p> <p>(2) <a href="http://developers.facebook.com/docs/authentication/client-side/" rel="nofollow">Client-Side Authentication</a> - You use the javascript sdk to authenticate the user in your canvas page.</p> <p>Once you have an access token you can get the email address by issuing a request to:</p> <pre><code>https://graph.facebook.com/me?fields=email </code></pre> <p>Or from the client side you can use:</p> <pre><code>FB.api("me?fields=email", function(response) { console.log(response); }); </code></pre> <hr> <h1>Edit</h1> <p>You should read the <a href="http://developers.facebook.com/docs/reference/javascript/" rel="nofollow">javascript sdk documentation</a>? especially the <a href="http://developers.facebook.com/docs/reference/javascript/FB.login/" rel="nofollow">FB.login part</a>. It shows an example of how to use it and asking for more permissions (using the the scope parameter)</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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