Closed sandeeppujare closed 7 years ago
Any updates on above mentioned issues
If your don't wish to share info those ino will be returned null. After 2015 April there was big change in security which allow user to choose what information they are sharing.
Update : ` $user = $this->facebook->getUser(); $user_profile = FALSE; if ($user) { try { $user_profile = $this->facebook->api('/me?fields=name,email'); } catch (FacebookApiException $e) { $user = null; }}
if(count($user_profile) == 3){
$avatar='https://graph.facebook.com/'.$user_profile['id'].'/picture?type=large';
$data=json_encode(array('fb'=>$user_profile));
$this->user_model->sign_in($user_profile['email'],$user_profile['name'],$avatar,$data);
redirect($this->base_url);
}
` Request email extra scope (/me?fields=name,email)
hope this will help you , its working for me . if email not found in response we can show error in view saying , you have denied permission to view email.
After sign in it graph api only returns user name and id and not all the other info such as email, location etc...am i dong something wrong ?