谁有QQ互联的ASP.NET的登陆Dome,现在还可以用的!
我用那个张善友前辈的现在无法CallBack呢,还是不行啊~~~好纠结
[C#] 纯文本查看 复制代码 if (Request.Params["code"] != null)
{
QOpenClient qzone = null;
var verifier = Request.Params["code"];
string state = Request.Params["state"];
string requestState =Session["requeststate"].ToString();//[color=Red]这地方出毛病[/color]
if (state == requestState)
{
qzone = new QOpenClient(verifier, state);
var currentUser = qzone.GetCurrentUser();
if (this.Session["QzoneOauth"] == null)
{
this.Session["QzoneOauth"] = qzone;
}
var friendlyName = currentUser.Nickname;
var isPersistentCookie = true;
//SetAuthCookie(qzone.OAuthToken.OpenId, isPersistentCookie, friendlyName);//写cookie
this.result.Text = "成功登陆";
this.Nickname.Text = currentUser.Nickname;
this.Figureurl.ImageUrl = currentUser.Figureurl;
}
}
|