PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, February 4, 2022

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

 February 04, 2022     facebook-php-sdk, laravel, laravel-4.2     No comments   

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
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

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

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing