oauth_get_creds

The All In One SEO Pack oauth get creds function.

Description

oauth_get_creds( $oauth_url, (constant) $req_token = null, (array) $args = array(), (null) $callback = null ); 

Parameters (4)

0. $oauth_url
The oauth url.
1. $req_token — Optional. (constant) => null
The req token.
2. $args — Optional. (array) => array()
The args.
3. $callback — Optional. (null) => null
The callback.

Usage

  1. if ( !function_exists( 'oauth_get_creds' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'all-in-one-seo-pack/inc/deprecated.php'; 
  3.  
  4. // The oauth url. 
  5. $oauth_url = null; 
  6.  
  7. // The req token. 
  8. $req_token = null; 
  9.  
  10. // The args. 
  11. $args = array(); 
  12.  
  13. // The callback. 
  14. $callback = null; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = oauth_get_creds($oauth_url, $req_token, $args, $callback); 
  18.  

Defined (1)

The function is defined in the following location(s).

/inc/deprecated.php  
  1. function oauth_get_creds( $oauth_url, $req_token = null, $args = array(), $callback = null ) { 
  2. if ( ! class_exists( 'OAuthConsumer' ) ) { 
  3. require_once( AIOSEOP_PLUGIN_DIR . 'inc/extlib/OAuth.php' ); 
  4. if ( ! empty( $callback ) ) { 
  5. $args['oauth_callback'] = $callback; 
  6. if ( empty( $this->sig_method ) ) { 
  7. $this->sig_method = new OAuthSignatureMethod_HMAC_SHA1(); 
  8. if ( empty( $this->consumer ) ) { 
  9. $this->consumer = newOAuthCOnsumer 'anonymous', 'anonymous' ); 
  10. $req_req = OAuthRequest::from_consumer_and_token( $this->consumer, $req_token, 'GET', $oauth_url, $args ); 
  11. $req_req->sign_request( $this->sig_method, $this->consumer, $req_token ); 
  12.  
  13. return $req_req;