MaoStream MaoStream - 1 year ago 79
PHP Question

Get social user info in view Laravel

I am using laravel social auth guide and I dont know how can I get users info from database.
To get info by auth user I can use
Auth::user()->id; to get info by users created by normal register. How get id of user logged by socialmedia?

Answer Source

If you are using Socialite class and facebook service provider:

$user = Socialite::driver('facebook')->user();

Once, you get the user instance, you can get few more details with:


See Social authentication using Socialite for more.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download