I am already setting up a login using facebook using socialite on my laravel 5 website but I just get basic user data such as name and email address how can I get the user's location (country, city) and birthday?
at the moment I have this in my controller to retrieve user data
class UserRepository { public function findByUsernameOrCreate($userData) { return User::firstOrCreate([ 'name' => $userData->name, 'email'=> $userData->email ]); } }
you just need to specify areas and fields before redirecting
Socialite::driver('facebook')->fields([ 'first_name', 'last_name', 'email', 'gender', 'birthday' ])->scopes([ 'email', 'user_birthday' ])->redirect();
:)
Source: https://habr.com/ru/post/1214884/More articles:Can I embed graphics (offline) in PyQt4? - pythonDifference between Thread and AsyncTask? - javaXcode project name spaces, what's the best practice? - xcodeLimit berth scanning in maven plugin - javaNew Unity3d user interface: How to set the interactive area of a button larger than the attached image? - unity3dMapReduce Output ArrayWritable - javaHaving experienced the crash described below on Nexus 5 (Android 5.0.1) - androidRscript pipeline gives error after output - unixEbean update method not working in playframework - javaUsing signals and sigpipe - cAll Articles