Hello, im testing the "Yahoo! Social SDK for PHP" and got stuck on the auth part.
here is the code im using:
==========================================
<?php
require("lib/Yahoo.inc");
$GLOBAL_YAHOO_LOGGER_DEBUG = true;
$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION = "CONSOLE";
define('CONSUMER_KEY', "dj0yJmk9T29NUGVvaUMxM0R1JmQ9WVdrOVdVa3hhamRsTkc4bWNHbzlOakkxT1RreU5qQXgmcz1
jb25zdW1lcnNlY3JldCZ4PTA2");
define('CONSUMER_SECRET', "e9809bbc5e06ebd25986301cc8ee3388a32e92a5");
define('APPID', "YI1j7e4o");
$session = YahooSession::requireSession(CONSUMER_KEY,CONSUMER_SECRET,APPID);
?>
==========================================
which outputs the following:==========================================
DEBUG - HTTP request details
DEBUG OBJECT - Array
(
[method] => POST
[url] =>
https://api.login.yahoo.com/oauth/v2/get_request_token [code] => 401
[requestHeaders] => Array
(
[0] => Accept: application/json
[1] => Content-Type: application/x-www-form-urlencoded
)
[requestBody] => oauth_callback=http%3A%2F%2F&oauth_consumer_key=dj0yJmk9T29
NUGVvaUMxM0R1JmQ9WVdrOVdVa3hhamRsTkc4bWNHbzlOakkxT1RreU5qQXgmcz1jb25zdW1lcnNlY3J
ldCZ4PTA2&oauth_nonce=c5793cc48ef18c2e32ebb498bb2bb063&oauth_signature=qu1IuVSYl
pRdfXrlO0BALo8ZJJM%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=125820049
0&oauth_version=1.0
[responseHeaders] => Array
(
[Date] => Sat, 14 Nov 2009 12:08:10 GMT
[P3P] => policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP
COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUB
i IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
[WWW-Authenticate] => OAuth oauth_problem=consumer_key_rejected
[Connection] => close
[Transfer-Encoding] => chunked
[Content-Type] => application/x-www-form-urlencoded
)
[responseBody] => oauth_problem=consumer_key_rejected
)
ERROR - Failed to create request token: consumer_key_rejected
ERROR - Failed to create request token
ERROR - Failed to create authorization URLs==========================================
PLEASE HELP AS I TRIED EVERYTHING!