我一直从windows live收到此错误
输入参数'redirect_uri'的提供值无效.预期值为"https://login.live.com/oauth20_desktop.srf"或与重定向匹配的URL
为什么我一直收到这个错误.我在windows live developer app中设置了域名
在我的<head>元素中
<script src="//js.live.net/v5.0/wl.js"></script>
Run Code Online (Sandbox Code Playgroud)
就在我所拥有的<body>元素的正下方
WL.init({
client_id: '{S_AL_WL_CLIENT_ID}', //{S_AL_WL_CLIENT_ID} = phpbb template variable for client_id
redirect_uri: '{AL_BOARD_URL}', //{AL_BOARD_URL} = phpbb template variable for the urlencoded domain name
response_type: 'token',
scope: ["wl.signin", "wl.basic", "wl.birthday", "wl.emails", "wl.work_profile", "wl.postal_addresses"]
});
Run Code Online (Sandbox Code Playgroud)
登录按钮是
<div id="login">
<a href="#"><img src="images/windows_live_connect.png" alt="Windows Live" /></a>
</div>
Run Code Online (Sandbox Code Playgroud)
听众
jQuery('#login a').click(function(e)
{
e.preventDefault();
WL.login({
scope: ["wl.signin", "wl.basic", "wl.birthday", "wl.emails", "wl.work_profile", "wl.postal_addresses"]
}).then(function (response)
{
//do something with stuff here. You know brainy type ajaxy stuff …Run Code Online (Sandbox Code Playgroud)