Sign in oauth/authenticate not working


#1

Hello! I’m trying without success, performing authentication of a user.
When all of the following steps:

	        /* Build TwitterOAuth object with client credentials. */
	        $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);

	        /* Get temporary credentials. */

	        $request_token = $connection->getRequestToken("XXXXXXXXXX");
	        
	        $token = $request_token['oauth_token'];
	        
	        /* Build authorize URL and redirect user to Twitter. */
	        $url = $connection->getAuthorizeURL($token);

The url is equivalent to: https://api.twitter.com/oauth/authenticate?oauth_token=0vrQyYwfLazCJApUfriDQB1XgEDvgCIz5DEWzGqZQM

but when accessing the url, and perform acceptance, makes a callback to https://api.twitter.com/oauth/authenticate

The app callback it’s set with the same web of $connection->getRequestToken(“XXXXXXXXXX”);

I’m going crazy from 2 days ago and should be easier, any help?