locked
Live Services RRS feed

  • שאלה

  • היי

    אני מנסה להתחבר לשירותי Live ואינני מצליח. הקוד שרשמתי הוא כזה:

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>JavaScript Code Sample</title>
        <!-- WinJS references -->
        <link href="//Microsoft.WinJS.1.0.RC/css/ui-dark.css" rel="stylesheet" />
        <script src="//Microsoft.WinJS.1.0.RC/js/base.js"></script>
        <script src="//Microsoft.WinJS.1.0.RC/js/ui.js"></script>
        <!-- JavaScript Code Sample references -->
        <link href="/css/default.css" rel="stylesheet">
        <script src="/js/default.js"></script>
        <!-- Developer-defined references -->
        <script src="///LiveSDKHTML/js/wl.js"></script>
    </head>
    <body>
        <h1>JavaScript Code Sample</h1>
        <div id="signin"></div>
        <label id="info"></label>
        <script>
            WL.login({
                scope: "wl.basic"
            }).then(
            function (response) {
                WL.api({
                    path: "me",
                    method: "GET"
                }).then(
                    function (response) {
                        document.getElementById("infoArea").innerText =
                            "Hello, " + response.first_name + " " +
                            response.last_name + "!";
                    },
                    function (responseFailed) {
                        document.getElementById("infoArea").innerText =
                            "Error calling API: " + responseFailed.error.message;
                    }
                );
            },
            function (responseFailed) {
                document.getElementById("infoArea").innerText =
                    "Error signing in: " + responseFailed.error_description;
            }
        );
        </script>
    </body>
    </html>
    

    אשמח לעזרה

    תודה

    יום שני 13 אוגוסט 2012 13:32