Commit af7c614c1058bb81843cbd9acc2e64891d40b3f8
1 parent
b33dc1c6
test google lib
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
app/library/App/Bootstrap/RouteBootstrap.php
@@ -59,6 +59,7 @@ class RouteBootstrap implements BootstrapInterface | @@ -59,6 +59,7 @@ class RouteBootstrap implements BootstrapInterface | ||
59 | putenv('GOOGLE_APPLICATION_CREDENTIALS=/var/www/phalcon/ca4a1bd8aa14.json'); | 59 | putenv('GOOGLE_APPLICATION_CREDENTIALS=/var/www/phalcon/ca4a1bd8aa14.json'); |
60 | $client = new Google_Client(); | 60 | $client = new Google_Client(); |
61 | $client->useApplicationDefaultCredentials(); | 61 | $client->useApplicationDefaultCredentials(); |
62 | + $client->setScopes(['https://www.googleapis.com/auth/analytics.readonly']); | ||
62 | //$api_key = 'AIzaSyCgyPQhOmGEwyAdZ0uS6fJLLvnNxgncfy0'; | 63 | //$api_key = 'AIzaSyCgyPQhOmGEwyAdZ0uS6fJLLvnNxgncfy0'; |
63 | //$client->setDeveloperKey($api_key); | 64 | //$client->setDeveloperKey($api_key); |
64 | $analytics = new Google_Service_AnalyticsReporting($client); | 65 | $analytics = new Google_Service_AnalyticsReporting($client); |