Hi!
I have a problem. I wanna create a script where user can login throught yahoo
http://yap-studio.com/apps/tv-blog/source [http://developer.yahoo.com/social/updates/packages/tv-blog-demo_1.1.zip]
ive changed config.inc - inserted my consumer key, consumer secret and application ID.
added correct path for Yahoo.inc
added JSON.php and QAuth.php the same dir where is Yahoo.inc
I get the following error when requesting an unauthorized request token (first stage of OAuth):
OAuth Error: Custom port is not allowed or the host is not registered with this consumer key.I have tried to understand where this script performing breaks and went till the place,
where the following method getting called out YahooAuthorization::getRequestToken.
after implementation of this line in that method (YahooAuthorization::getRequestToken)
$response = $client->post($request_url, "application/x-www-form-urlencoded", $parameters);
$response[responseBody] => OAuth Error: Custom port is not allowed or the host
is not registered with this consumer key.
and $response[code] => 401
and YahooLogger::setDebugDestination('CONSOLE'); is showing
ERROR - Failed to create request token2: unknown problem
ERROR - Request token doesn't have a 'key' property
here are the keys, that I use
define("API_KEY","dj0yJmk9TEJ6aU5RUVpIakVhJmQ9WVdrOWVWbHZkbGx5TmpRbWNHbzlNVFkxTkRVNE5EZ3pPUS0
tJnM9Y29uc3VtZXJzZWNyZXQmeD0xZQ--");
define("SHARED_SECRET","6f8cad40de1877e72d617823270d22eb017fda01");
here is a script, that I made for keys verification
url:
http://apps.yahoo.com/-yYovYr64source:
<?php
require_once('lib/Yahoo.inc');
//define constants to store your API Key (Consumer Key) and Shared Secret (Consumer Secret)
define("API_KEY","dj0yJmk9TEJ6aU5RUVpIakVhJmQ9WVdrOWVWbHZkbGx5TmpRbWNHbzlNVFkxTkRVNE5EZ3pPUS0
tJnM9Y29uc3VtZXJzZWNyZXQmeD0xZQ--");
define("SHARED_SECRET","6f8cad40de1877e72d617823270d22eb017fda01");
//initializes session and redirects user to Yahoo! to sign in and then authorize app
$yahoo_session = YahooSession::requireSession(API_KEY, SHARED_SECRET);
//get currently logged in user
$yahoo_user = $yahoo_session->getSessionedUser();
var_dump($yahoo_user);
?>
here is my app
http://webdev.qarea.org/marcoss/yahoo/login/u can see debug info in firebug console
Could you please show me where is my mistake and what do I do wrong?