public function GAFeed::obtainAuthorization in Google Analytics Reports 6
Same name and namespace in other branches
- 7 GAFeed.lib.inc \GAFeed::obtainAuthorization()
OAuth step #2: Authorize request token.
File
- ./
GAFeed.lib.inc, line 114 - Provides the GAFeed object type and associated methods.
Class
- GAFeed
- GAFeed class to authorize access to and request data from the Google Analytics Data Export API.
Code
public function obtainAuthorization($token) {
$this
->setHost($this->OAuthHost);
$this
->setQueryPath('accounts/OAuthAuthorizeToken');
/* hd is the best way of dealing with users with multiple domains verified with Google */
$params = array(
'oauth_token' => $token['oauth_token'],
'hd' => variable_get('google_analytics_reports_hd', 'default'),
);
drupal_goto($this->queryPath, $params);
}