Hola, como andan? Estoy queriendome conectar a open x, y para eso debo hacer un login con
oauth, ¿Alguien podría decirme por que no puedo obtener el request token?
Código PHP:
Ver original$oauth = new OAuth($key, $secret, OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_URI );
$url = "https://sso.openx.com/api/index/initiate?&oauth_realm=$realm&oauth_timestamp=".time()."&oauth_consumer_key=".$key."&oauth_signature_method=HMAC-SHA1&oauth_callback=http://www.google.com"; $request_token = $oauth->getRequestToken($url, "http://www.google.com");
if(!empty($request_token)) { } else {
print "Failed fetching request token, response was: " . $oauth->getLastResponse();
}
Cuando llamo al método getRequestToken me dice este error:
Fatal error: Uncaught exception 'OAuthException' with message 'Invalid auth/bad request (got a 400, expected HTTP/1.1 20X or a redirect)' in /var/www/index.php:46 Stack trace: #0 /var/www/index.php(46): OAuth->getRequestToken('https://sso.ope...', 'http://www.goog...') #1 {main} thrown in /var/www/Taggify/index.php on line 46
saludos