我一直试图通过Yahoo OAUTH获得联系超过4个小时..终于在最后阶段。已经非常密切地关注this并且我也成功获得了请求令牌。但是当我拿到以下网址:
以及提到的参数here.
我只是收到HTTP错误
在加速器上找不到
这就是我现在想要的......
https://social.yahooapis.com/v1/user/(some guid)/contacts?format=json&realm=yahooapis.com&oauth_consumer_key=(some key)&oauth_nonce=p0p@wA$h3rE&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1363691527&oauth_token=(access token here)&oauth_version=1.0&oauth_signature=(some sign)
答案 0 :(得分:0)
// your url .........
var url = "https://social.yahooapis.com/v1/user/"+guid+"/contacts?format=json";
//你需要让json请求所有数据
var data = JSON.stringify({
realm="yahooapis.com",
oauth_consumer_key="dj0yJmk9nM9Y29uc3VtZXJzZWNyZXQmeD1lMg--",
oauth_nonce="24829.2331",
oauth_signature_method="HMAC-SHA1",
oauth_timestamp="1219450170",
oauth_token="A%3DuqkiebGpiTJl7ThQxU.jDXXaETYyfEy3xAKPyoavokwOOcZcz8Xs_l1Nvnl._
KmCEVCeLkxxT1Y6BgRqf5f98sQWHklBM_anetveR7okK_M_5XEmQ1_1reo3UgKQULT_dQT8Gao3.
Rrgz5rJxgmnYrhdWWdfgTdMQVzpbJT2aGkz59NTK1O8yXVE1EvZUCqju7WiFYu.WHNEw.9TWq3g--",
oauth_version="1.0",
oauth_signature="O2AQipLITO0aYHKZc9266RzC94%3D"
});
var client = Ti.Network.createHTTPClient({
// function called when the response data is available
onload : function(e) {
},
onerror : function(e) {
Ti.API.debug(e.error);
alert('error');
},
timeout : 5000 // in milliseconds
});
// Prepare the connection.
client.open("GET", url);
client.setRequestHeader("Content-Type","application/json");
client.send(data);
答案 1 :(得分:0)
网址错误,应该如yahoo api docs中给出的那样