【发布时间】:2015-11-03 05:28:09
【问题描述】:
我正在尝试使用 hello.js 进行 Yahoo oAuth。请找到我写的代码:
window.onload = function()
{
hello.init(
{
// "yahoo" : "M0FZ5t7i"
"yahoo" : "dj0yJmk9WGJDUHpwMkxBNUxEJmQ9WVdrOU4xcFBZVUo1TldrbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD1jMw--"
},
{
redirect_uri:'staging.name.com',
oauth_proxy: "https://auth-server.herokuapp.com/proxy"
//https://auth-server.herokuapp.com/ https://auth-server.herokuapp.com/proxy
});
}
点击我添加的按钮:
hello("yahoo").login().then(function()
{
// Get Profile
return hello("yahoo").api('me');
}).then(function(p)
{
console.log(p.name);
}).then(null, function(e){
console.error(e);
alert(e);
});
我收到无效的凭据。另外我的问题是client_id,我应该使用消费者密钥还是 Appid?
我还有https://auth-server.herokuapp.com/ 可以添加为代理。应该在其中输入什么字段值?另外,域和引用代表什么?
【问题讨论】:
-
德鲁在下面给了你一个答案,有用吗?通常在这里投票和/或接受有用的答案,因此帮助者会得到一点鼓励以继续提供帮助。如果您想知道该怎么做,请告诉我。
-
投反对票,见上文。
标签: javascript html oauth yahoo hello.js