yidas / google-api-sample
Google API Client Libraries with Google service samples for PHP
Requires
- php: >=5.4.0
- google/apiclient: ^2.0
This package is auto-updated.
Last update: 2024-11-10 21:31:40 UTC
README
Google API Client Libraries with Google service samples for PHP
INSTALLATION
1. Download the Project
Composer download:
composer create-project --prefer-dist yidas/google-api-sample
You could download by git clone or by zip file alternatively.
2. Google API Credential
In Google API Console, you need to set a credential including pointing web root URL to Authorized redirect URIs likes http://{thisPackage}/www/callback.php
, and then enable APIs such as Google+ API, Calendar API and Drive API in Library.
Then download the credential JSON file then rename and place it to {thisPackage}/files/client_secret.json
.
LIBRARIES INCLUSION
-
User Component
-
Google Calendar API Component
GOOGLE SERVICES DEMONSTRATION
-
Google Plus
For getting Google User information. -
Calendar
-
Drive
ADDITIONS
Guzzle SSL Verify Problem
If you are using Windows as service server, you may deal with SSL certificate problem.
This problem could be solved by modifing vendor/google/apiclient/src/Google/Client.php
:
// For windows PHP cURL $options['verify'] = false;