public function GoogleAnalyticsReportsApiFeed::beginAuthentication in Google Analytics Reports 7.3
Begin authentication.
Allowing the user to grant/deny access to the Google account.
Parameters
String $client_id:
File
- google_analytics_reports_api/
google_analytics_reports_api.lib.inc, line 174 - Provides the Google Analytics Reports API Feed object type and associated methods.
Class
- GoogleAnalyticsReportsApiFeed
- GoogleAnalyticsReportsApiFeed class to authorize access to and request data from the Google Analytics Core Reporting API.
Code
public function beginAuthentication($client_id, $redirect_uri) {
$url = $this
->createAuthUrl($client_id, $redirect_uri);
$array = explode("?", $url);
$array2 = explode("&", $array[1]);
$queries = array();
foreach ($array2 as $query) {
$array3 = explode("=", $query);
$queries[$array3[0]] = $array3[1];
}
drupal_goto($array[0], array(
'query' => $queries,
));
}