Example #1
0
    //获取听众
    protected void Unnamed1_Click(object sender, EventArgs e)
    {
        GetAccessToken(appKey, appSecret, tokenKey, tokenSecret, Session["Verify"].ToString());

        accessKey    = tokenKey;
        accessSecret = tokenSecret;

        OauthKey oauthKey = new OauthKey();

        oauthKey.customKey    = appKey;
        oauthKey.customSecret = appSecret;
        oauthKey.tokenKey     = accessKey;
        oauthKey.tokenSecret  = accessSecret;

        friends friends = new friends(oauthKey, "json");
        string  data    = friends.fanslist(10, 0);

        Audience weibo = YK.Common.JsonHelper.ParseFormByJson <Audience>(data);

        GridView1.DataSource = weibo.data.info;
        GridView1.DataBind();
    }