using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using xabaraCOM;

public partial class member_api_qqLogin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string appID = xml.read("xabara.config", "qqAppID", 180);

        string state = xabara.rnd("abc123", 6);
        Session.Add("state", state);
        string callbackUrl = "http://" + Request.Url.Host + "/member/api/qqReturnUrl.aspx";
        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";

        Response.Redirect("https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=" + appID + "&redirect_uri=" + callbackUrl + "&scope=" + scope + "&state=" + state, true);
    }
}