Преминах през всички вериги на oauth и когато се обаждам, за да получа информацията за контактите, получавам само грешка 401.
това е моят код:
<?php
//define yahoo consumer key
$yahoo_consumer_key = variable_get('_contact_grabber_yahoo_consumer_key',NULL);
define('YAHOO_CONSUMER_KEY', $yahoo_consumer_key);
//define yahoo consumer_secret
$yahoo_consumer_secret = variable_get('_contact_grabber_yahoo_consumer_secret',NULL);
define('YAHOO_CONSUMER_SECRET', $yahoo_consumer_secret);
//define yahoo callback
$yahoo_callback = variable_get('_contact_grabber_yahoo_callback',NULL);
define('YAHOO_CALLBACK', $yahoo_callback);
//define app id constant
$yahoo_app_id = variable_get('_contact_grabber_yahoo_app_id',NULL);
define('YAHOO_APP_ID', $yahoo_app_id);
$url =
'http://social.yahooapis.com/v1/user/'.$_SESSION['yahoo']['token']['xoauth_yahoo_guid'].'/contacts?';
$url .= 'oauth_consumer_key='.YAHOO_CONSUMER_KEY;
$url .= '&oauth_nonce='.sha1(time() + rand(0,10));
$url .= '&oauth_signature_method=plaintext';
$url .= '&oauth_timestamp='.time();
$url .= '&oauth_token='.$_SESSION['yahoo']['token']['oauth_token'];
$url .= '&oauth_version=1.0';
$url .= '&oauth_signature='.YAHOO_CONSUMER_SECRET;
$result = drupal_http_request($url);
dpm($result);
?>
Това е грешката:
<yahoo:error xml:lang="en-US">
<yahoo:description>
Please provide valid credentials. OAuth oauth_problem="signature_invalid", realm="yahooapis.com"
</yahoo:description>
</yahoo:error>
Никъде не намирам как да поправя това. Благодаря
Оскар