'foobar', 'redirectUri' => 'http://localhost/login' ]); if ( ! isset($_GET['code'])) { $provider->authorize(); // Go to Facebook and sign in } else { $token = $provider->getAccessToken($_GET['code']); // Get the access token $user_details = $provider->getUserDetails($token); // Get the user’s details echo '<h1>Hello, ' . $user_details['name'] . '!</h1>'; // Boom } Tuesday, 16 October 12