社交登录 - Laravel 4.2 申请 - 需要额外数据

Social login - Laravel 4.2 application - need additional data

我正在使用这个包,https://github.com/artdarek/oauth-4-laravel但只获取 ID 和用户名。 我需要其他数据,例如电子邮件、名字、姓氏等

我使用了这个包,因为还需要将登录与 google 集成

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

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

这两个步骤解决了我的问题。但是在文档中没有找到。