Ejemplo n.º 1
0
 /**
  * build Parameters
  * 
  * return
  *   Authorization parameters for OAuth
  */
 private function buildParameters()
 {
     $params = array('oauth_consumer_key' => $this->consumer_key, 'oauth_signature_method' => EDAssist::$signature_method, 'oauth_timestamp' => time(), 'oauth_nonce' => EDAssist::nonce(), 'oauth_version' => EDassist::$oauth_version);
     if (isset($this->oauth_token)) {
         $params['oauth_token'] = $this->oauth_token;
     }
     $params = array_merge($params, $this->post);
     $params['oauth_signature'] = self::createSignature($params);
     $this->parameters = $params;
     ksort($this->parameters);
 }
Ejemplo n.º 2
0
 /**
  * getAccessToken
  * 
  * return
  *   oauth token and token secret, oauth/access_token provided
  */
 public function getAccessToken()
 {
     $url = EDAssist::$scheme . EDAssist::$host . EDAssist::$api_access_token;
     $method = 'GET';
     $params = self::getParameter_AccessToken();
     $response = self::eduwitteConnect($url, $method, $params);
     return EDAssist::query2Params($response);
 }