Getting email from facebook

I'm having trouble getting the email from facebook.

$user_id = $data->user->identity->emails->value;

But it throws this error: Notice: Trying to get property of non-object on the line above.

Best Answer

  • Answer ✓

    $user_id = $data->user->identity->emails[0]->value;

    Is what I needed.


    Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

    Please click on the link below to connect to the forum with your OneAll account.