4
從窗戶住對輸入參數「REDIRECT_URI」提供的值是無效
提供的值的輸入參數「REDIRECT_URI」我不斷收到這個錯誤並不 有效。期望值是 「https://login.live.com/oauth20_desktop.srf」或者其爲什麼我不斷收到此錯誤匹配 重定向
URL。我在<頭>元素域在Windows中設置住開發商的應用程序
我
<script src="//js.live.net/v5.0/wl.js"></script>
只是<體>元素下面我有
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"]
});
登錄按鈕是
<div id="login">
<a href="#"><img src="images/windows_live_connect.png" alt="Windows Live" /></a>
</div>
聽者
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 to auth a user
},
function (responseFailed)
{
console.log("Error signing in: " + responseFailed.error_description);
});
});
也將http:// yourdomain.com而不是http:// www.yourdomain.com添加爲應用程序域@windows-live app部分允許使用這兩種類型的域名,但會導致cookie錯誤。 –