symfony - No Scopes Specified - Google_Auth_Exception -
i applying this tutorial symfony 2.4, i've finished setup in config.yml , everything, managed visit admin/google/analytics page, problem when tried authenticate parameters i've created in config.yml file, searching scope, here parameters.
happy_r_google_analytics: host: www.example.com profile_id: myprofileid tracker_id: ua-tracker-id token_file_path: %kernel.root_dir%/var/storage happy_r_google_api: application_name: project default service account oauth2_client_id: oauthclientid oauth2_client_secret: oauthclientsecret oauth2_redirect_uri: http://www.example.com/app_local.php/admin/google/analytics/oauth2callback developer_key: developperkey site_name: http://www.example.com
i think there's no problem here, i've got no idea can set scope google api client can set https://www.googleapis.com/auth/analytics.readonly
you need define scope. if use google auth, check authorization scopes it.
you must like:
$googleclient = new \google_client(); $googleclient->setscopes(array( 'https://www.googleapis.com/auth/plus.me', 'https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/userinfo.profile', ));
Comments
Post a Comment