krazy

Untitled

Nov 5th, 2011
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.         $(function(){
  3.             var Oauth = {};
  4.            
  5.             Oauth = {
  6.                 init:function(){
  7.                     var now = this;
  8.                     this.redirect();
  9.                     this.get_accessToken();
  10.                    
  11.                 },
  12.                 redirect : function(){
  13.                     var auth_url ="https://api.weibo.com/oauth2/authorize?client_id=";
  14.                     var auth_url_end = "&response_type=token&redirect_uri=http://www.baidu.com";
  15.                     var client_id = 965700781,redirect_uri;
  16.                     var url = auth_url + client_id + auth_url_end;
  17.                     window.window.location.href= url;
  18.                 },
  19.                 get_accessToken :  function(){
  20.                     $(window).onUnload(function(){
  21.                         //var hash = document.location.hash.substring(1);
  22.                         alert("ss");
  23.                     });
  24.                 }
  25.             }
  26.             Oauth.init();
  27.         });
  28.     </script>
Advertisement
Add Comment
Please, Sign In to add comment