Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Include Google Client Library for PHP autoload file
- require_once 'vendor/autoload.php';
- //Make object of Google API Client for call Google API
- $google_client = new Google_Client();
- //Set the OAuth 2.0 Client ID
- $google_client->setClientId('PASTE CLIENT ID');
- //Set the OAuth 2.0 Client Secret key
- $google_client->setClientSecret('PASTE SECRET KEY');
- //Set the OAuth 2.0 Redirect URI
- $google_client->setRedirectUri('http://localhost/sample-musik/login_google.php');
- $google_client->addScope('email');
- $google_client->addScope('profile');
- session_start();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement