I’m trying to create a signature for the twitch api, but I don’t know what’s wrong
$this->timestamp = time();
$this->nonce = mt_rand();
$base = 'POST' . "&" . rawurlencode('https://api.twitter.com/1.1/statuses/update.json') . "&" . rawurlencode('include_entities=true&')
. rawurlencode("oauth_consumer_key=" . rawurlencode($this->consumer_key)
. "&oauth_nonce=" . rawurlencode($this->nonce)
. "&oauth_signature_method=" . $this->oauth_signature_method
. "&oauth_timestamp=" . $this->timestamp
. "&oauth_token=" . $this->access_token
. "&oauth_version=" . $this->oauth_version
. "&status=Hello%20Ladies%20%2b%20Gentlemen%2c%20a%20signed%20OAuth%20request%21"
);
dump("base string");
dump($base);
$key = rawurlencode($this->consumer_secret) . '&' . rawurlencode($this->token_secret);
$this->signature = base64_encode(hash_hmac('sha1', $base, $key, true));