2
Parse error: syntax error, Unexpected 'catch' (T_CATCH), expecting end of file in C: xampp htdocs validar_cad_usuario face.php on line 65
My Project is here if anyone can help, I thank you!
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get('/me?fields=name, picture, email');
$user = $response->getGraphUser();
//var_dump($user);
$result_usuario = "SELECT id, nome, email FROM usuario WHERE email='".$user['email']."' LIMIT 1";
$resultado_usuario = mysqli_query($conn, $result_usuario);
if($resultado_usuario){
$row_usuario = mysqli_fetch_assoc($resultado_usuario);
$_SESSION['id'] = $row_usuario['id'];
$_SESSION['nome'] = $row_usuario['nome'];
$_SESSION['email'] = $row_usuario['email'];
header("Location: administrativo.php");
}
}
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
It’s a syntax error. No code, no way to tell where the problem is.
– rray
https://drive.google.com/file/d/10sL8xxdUv-cTkwmwyXmoSqLrawnDNcMa/view?usp=sharing
– Lucas
this is the project if you can take a look and help me
– Lucas
We didn’t miss a
}
of Try?– rray
can you check, she’s there
– Lucas
managed to solve, the problem was the key of the if there above
– Lucas