oauth_get_token
The All In One SEO Pack oauth get token function.
Description
(array) oauth_get_token( $oauth_verifier );
Returns (array)
Parameters (1)
- 0. $oauth_verifier
- The oauth verifier.
Usage
if ( !function_exists( 'oauth_get_token' ) ) { require_once ABSPATH . PLUGINDIR . 'all-in-one-seo-pack/inc/deprecated.php'; } // The oauth verifier. $oauth_verifier = null; // NOTICE! Understand what this does before running. $result = oauth_get_token($oauth_verifier);
Defined (1)
The function is defined in the following location(s).
- /inc/deprecated.php
- function oauth_get_token( $oauth_verifier ) {
- if ( ! class_exists( 'OAuthConsumer' ) ) {
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/extlib/OAuth.php' );
- }
- $args = array(
- 'scope' => 'https://www.google.com/analytics/feeds/',
- 'xoauth_displayname' => AIOSEOP_PLUGIN_NAME . ' ' . __( 'Google Analytics', 'all-in-one-seo-pack' )
- );
- $args['oauth_verifier'] = $oauth_verifier;
- $oauth_access_token = 'https://www.google.com/accounts/OAuthGetAccessToken';
- $reqData = $this->oauth_get_data( $oauth_access_token, $args );
- $reqOAuthData = OAuthUtil::parse_parameters( wp_remote_retrieve_body( $reqData ) );
- return $reqOAuthData;
- }