<!--#include file="oauth.asp"-->
<%
	Dim t : Set t = New OAuth
	If IsArray(Session("token_qq")) Then
		t.getToken Session("token_qq"),"token"     
		Set info=t.getUserInfo(Session("token_qq"))	
		Response.Write("昵称："&info.nickname&"<br />")
		Response.Write("头像："&info.figureurl&"<br />")
		Response.End()
		Set t=Nothing
	End If
	If Request("oauth_vericode")<>"" Then 
		Dim verifier
		verifier=Request("oauth_vericode")
		t.getToken Session("keys"),"request" 
		token=t.getAccessToken(verifier)
		Session("token_qq")=token
		't.getToken Session("token_qq"),"token"     
		'Set info=t.getUserInfo(Session("token_qq"))	
		'Response.Write("昵称："&info.nickname&"<br />")
		'Response.Write("头像："&info.figureurl&"<br />")
		Response.Write("<script>window.close();</script>")
		Set t=Nothing
	Else 
		keys=t.getRequestToken
		Session("keys")=keys
		aurl=t.getAuthorizeURL(keys)
		Set t=Nothing
		Response.Redirect(aurl)
		'Response.Write("<a href="""+aurl+""">用OAUTH授权登录</a>")
	End If 
%>