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