コンソール:https://cloud.google.com/console/project/
-
APIsでCalendar APIをONに
-
CredentialsでCREATE NEW CLIENT ID押して登録
- Client ID、Client secret, Redirect URLsをコピー
-
CredentialsでCREATE NEW KEY押して登録
- API keyってのを登録
-
Consent screenでProduct nameを登録
-
設定ファイルを書き換え
return array(
// True if objects should be returned by the service classes.
// False if associative arrays should be returned (default behavior).
'use_objects' => true,
// The application_name is included in the User-Agent HTTP header.
'application_name' => 'HOUR',
// OAuth2 Settings, you can get these keys at https://code.google.com/apis/console
'client_id' => '662155359262.apps.googleusercontent.com',
'client_secret' => 'EaBj6dZe54IqcSbnKyJ1qYQs',
'redirect_uri' => 'http://localhost/auth/callback',
// The developer key, you get this at https://code.google.com/apis/console
'developer_key' => 'AIzaSyAdCmJsNoQXHxZadMHYGgXnsK6xpxil6Bw',
// Site name to show in the Google's OAuth 1 authentication screen.
'site_name' => '',
// Which Authentication, Storage and HTTP IO classes to use.
'authClass' => 'apiOAuth2',
// Definition of service specific values like scopes, oauth token URLs, etc
'services' => array(
#Example: to work with Google Calendar you must specify its scope
'calendar' => array('scope' => 'https://www.googleapis.com/auth/calendar'),
),
);