none
var REDIRECT_URL = http://localhost:8080/skydrive/callback.jsp why not write http://localhost:8080/skydrive/callback.jsp RRS feed

  • 问题

  • var APP_CLIENT_ID="000000004C0C600A";
      var REDIRECT_URL="https://oauth.live.com/desktop";
      WL.init({
         client_id:APP_CLIENT_ID,
          redirect_uri:REDIRECT_URL,
          spoces:"wl.signin", 
          response_type:"token"
      });   
      WL.Event.subscribe("auth.login", onLogin); 
      WL.Event.subscribe("auth.sessionChange", onSessionChange); 
      var session = WL.getSession(); 
      if (session) {   // session is null , why?
          log("You are already signed in!"); 
      } else {  
          WL.login({ scope: "wl.signin" }); 
      } 
      function onLogin() { 
          var session = WL.getSession(); 
          if (session) { 
              log("You are signed in!"); 
          } 
      } 
      function onSessionChange() { 
          var session = WL.getSession();
          if (session) { 
              log("Your session has changed.");
          } 
      } 
      function log(message) { 
          var child = document.createTextNode(message); 
          var parent = document.body; parent.appendChild(child); 
          parent.appendChild(document.createElement("br"));
      }

    var REDIRECT_URL=http://localhost:8080/skydrive/callback.jsp 为什么不能写http://localhost:8080/skydrive/callback.jsp

    那我该写什么呢?

    var REDIRECT_URL = http://localhost:8080/skydrive/callback.jsp why not write http://localhost:8080/skydrive/callback.jsp

    I write it?

    2012年7月26日 2:33