I am paying attention to facebook using opauth.org framework slim3.
I'm not getting sex.
I get the other data: test site
Does anyone know if there is a syntax error?
$gender = @$auth['raw']['gender'];
The complete code:
switch(strtolower($auth['provider'])) {
case 'facebook' :
$oauth_id = $auth['uid'];
$password = mt_rand(10000000, 99999999);
$info = $auth['info'];
$firstname = @explode(' ', @$info['name'])[0];
$lastname = @explode(' ', @$info['name'])[1];
$image = @$info['image'];
$gender = @$auth['raw']['gender'];
$credentials = serialize(@$auth['credentials']);
if (!empty ($username = $info['email'])) $this-> $username = @$info['email'];
else {
$username = $oauth_id;
}