public function handleFacebookCallback() { $facebookUser = Socialite::driver('facebook')->user(); $user = FacebookService::userForFacebookUser($facebookUser); if (!$user) { $user = FacebookService::createUserForFacebookUser($facebookUser); } \Auth::login($user, true); return redirect('/'); }
public function __construct() { FacebookService::$client = new Client(); }