Here is my code, I have change the values by xxxxx.
<?php
$time = time();
$consumerkey='xxxxxxxx';
$consumersecret = 'xxxxxx';
/*
$created = date('c');
$nonce = substr(md5(uniqid('nonce_', true)),0,16);
$nonce64 = base64_encode($nonce);
$passwordDigest = base64_encode(sha1($nonce . $created . $consumersecret));
*/
$once1 = sha1(time() + rand(0,10));
$url = 'https://api.login.yahoo.com/oauth/v2/';
$url .= 'get_request_token?oauth_nonce='.$once1;
$url .= '&oauth_timestamp='.$time;
$url .= '&oauth_consumer_key='.$consumerkey;
$url .= '&oauth_signature_method=plaintext';
$url .= '&oauth_signature='.$consumersecret;
$url .= '&oauth_version=1.0';
$url .= '&xoauth_lang_pref="en-us"';
$url .= '&oauth_callback="oob"';
//dpm($url);
$result = drupal_http_request($url, $headers = array(), $method = 'GET', $data = NULL, $retry = 3, $timeout = 30.0);
dpm($result);
//dpm is like print_r
?>
I get this:
(String, 69 characters ) oauth_problem=parameter_absent&oauth_parameters...
-
(String, 22 characters ) Authorization Required
(String, 3 characters ) 401
Thanks
Oskar