Friday, February 4, 2022

[FIXED] Social login - Laravel 4.2 application - need additional data

Issue

I'm using this package, https://github.com/artdarek/oauth-4-laravel but only getting id and user name. I need additional data like email, firstname, lastname etc

I used this package as also need to integrate login with google also


Solution

  1. 'Facebook' => array( 'client_id' => 'aaa----aaaaa', 'client_secret' => 'xxx----xxxxx', 'callback_url' => 'http://staging.crossinghoods.com/customer-account/login/fb/callback', 'scope' => array('email'), ),

  2. $result = json_decode( $fb->request( '/me?fields=email,first_name,last_name,picture' ), true );

These two steps solved my issue. But it was not found in the documentation.



Answered By - Geethu

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.