Following is the code sources that loading the Facebook user’s email after the approval of the APP. There is the problem that we are fail to receive an user’s email data 1 in every 30 to 50 participants. Could you please check the code sources for us to solve this problem?
// FQL Call
$fql = "SELECT email, name from user where uid = ".$facebook_id;
$profile = $facebook->api(array(
"method" => "fql.query",
"query" => $fql,
));
$name = $profile[0]["name"];
$email = $profile[0]["email"];
// Registration
$query = "INSERT INTO `facebook_data` (`name`, `email`) VALUES ( ".$name." , ".$email." );";
$result = mysql_query($query);
谢谢!