Я пытаюсь реализовать windows live
логин, используя их API javascript. Я имею в виду this документации в качестве примера и используя следующий код:windows live login получить адрес электронной почты
WL.Event.subscribe("auth.login", onLogin);
WL.init({
client_id: 'my client id',
redirect_uri: 'redirect uri',
scope: ["wl.signin", "wl.basic"],
response_type: "token"
});
WL.ui({
name: "signin",
element: "signin"
});
function onLogin(session) {
if (!session.error) {
WL.api({
path: "me",
method: "GET"
}).then(
function (response) {
console.log(response);
document.getElementById("info").innerText =
"Hello, " + response.first_name + " " + response.last_name + "!";
},
function (responseFailed) {
document.getElementById("info").innerText =
"Error calling API: " + responseFailed.error.message;
}
);
}
else {
document.getElementById("info").innerText =
"Error signing in: " + session.error_description;
}
}
Приведенный выше код возвращает id
, name
и других областях, но я также хочу, чтобы получить пользователя email
и profile picture url
поля, как, как он возвращается в API google+
, указав email
в scope
. Я прошел через WL.init documentation и не упоминается email
и profile picture url
scope
значения. Любой способ получить эти два поля?