private function getOAuthHeader($http_method, $requestURL, $tokenType = 1) { $oAuthHeaderValues = array("oauth_consumer_key" => $this->consumerKey, "oauth_nonce" => $this->getOAuthNonce(), "oauth_signature_method" => "HMAC-SHA1", "oauth_timestamp" => mktime(), "oauth_version" => "1.0"); if ($tokenType > 0) { // Its not a request Request Token $oAuthHeaderValues["oauth_token"] = $this->requestToken; } $oAuthHeaderValues["oauth_signature"] = RequestSigner::build_signature($this->consumerSecret, $this->tokenSecret, $http_method, $requestURL, $oAuthHeaderValues); $oauthHeader = $this->buildOAuthHeader($oAuthHeaderValues); return sprintf("Authorization: %s", $oauthHeader); }