Esempio n. 1
0
 public ActionResult LogInQQ()
 {
     var context = new QzoneContext();
     string state = Guid.NewGuid().ToString().Replace("-", "");
     Session["requeststate"] = state;
     string scope = "get_user_info,add_share,list_album,upload_pic,check_page_fans,add_t,add_pic_t,del_t,get_repost_list,get_info,get_other_info,get_fanslist,get_idolist,add_idol,del_idol,add_one_blog,add_topic,get_tenpay_addr";
     var authenticationUrl = context.GetAuthorizationUrl(state, scope);
     return new RedirectResult(authenticationUrl);
 }
Esempio n. 2
0
 private void GetRequestToken()
 {
     QzoneContext context = new QzoneContext();
     string state = Guid.NewGuid().ToString().Replace("-", "");
     string scope = "get_user_info,add_share,list_album,upload_pic,check_page_fans,add_t,add_pic_t,del_t,get_repost_list,get_info,get_other_info,get_fanslist,get_idolist,add_idol,del_idol,add_one_blog,add_topic,get_tenpay_addr";
     string authenticationUrl = context.GetAuthorizationUrl(state, scope);
     //request token, request token secret 需要保存起来
     //在demo演示中,直接保存在全局变量中.真实情况需要网站自己处理
     Session["requeststate"] = state;
     Response.Redirect(authenticationUrl);
 }
Esempio n. 3
0
 public ActionResult QQLogin()
 {
     this.Session["RETURNURL"] = callback_qq_url;
     var context = new QzoneContext();
     string scope = "get_user_info";
     var authenticationUrl = context.GetAuthorizationUrl("fc", scope);
     return new RedirectResult(authenticationUrl);
 }