Failed to validate oauth signature and token



I’m doing my own library Twitter, but I have trouble generating the first step (which is the collection of the “request_token” This step assumes that you send some information to the servers and if well-formed information, the server must respond with the values: oauth_token, oauth_token_secret and oauth_callback_confirmed.

I am doing the steps (according to me well) according as the manual says “Implementing Sign in with Twitter” (

On my code, I created a library to call “sockets_io.php” where I have the function that connects the socket and allows you to send POST data flow and / or GET using “sockets” or “curl”.

And a second code that is “twitter.php” where are the main functions to facilitate the whole process, from connection, content publishing, etc …

The codes are:

socket_io v2.1 -
twitter v2.0 -

The code I use for testing is:

# incluir librerias de arriba 

$r= twitter_request_token( 'socket' );
echo '<h1>Result</h1><p>';
echo '</p>';

The error I get is:

Someone who can help me? …
Check out the link I get the error, there will see the Base String, Plot coming out and the results (answer the twitter server).


This is quite an undertaking.

Glancing at the error you provided a paste to, it looks like your signature base string contains a number of commas to separate parameters rather than the escaped “&” character. I’d start there.


Thanks for your answer @episod

The problem still continues, but I updated the information of the error:

Look the BASE STRING, is fixed buy the same error :frowning:


I update my error message, i worked in the system clock, but this is ok…

My problem still continue… :(, help !