title: Facebook OAuth Data Capturing
body: <p>I need to capture Oauth data coming from facebook into my table , i have written this code</p>
  
  <pre><code>$app_id = "340088232675552";
  $canvas_page = "https://apps.facebook.com/appluckyprice/index.php";
  $auth_url = "https://www.facebook.com/dialog/oauth?client_id=" 
      . $app_id . "&amp;redirect_uri=" . urlencode($canvas_page) . "&amp;scope=email,user_birthday,user_hometown";
  </code></pre>
  
  <p>I am using </p>
  
  <pre><code>$data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);
  $graph_url = 'https://graph.facebook.com/'.$data["user_id"].'';
  $user = json_decode(file_get_contents($graph_url));
  
  $user_email = $data['user']-&gt;email;
  echo $user_email;
  </code></pre>
  
  <p>But it isn't displaying anything, How to capture Email ?</p>