Пример #1
0
        /// <summary>
        /// 获取关注者列表
        /// </summary>
        /// <param name="next_openid"></param>
        /// <param name="access_token"></param>
        /// <returns></returns>
        public static Followers GetFollowers(string next_openid, string access_token)
        {
            string url = "https://api.weixin.qq.com/cgi-bin/user/get?access_token=" + access_token;

            if (!string.IsNullOrEmpty(next_openid))
            {
                url = url + "&next_openid=" + next_openid;
            }
            var json = Util.HttpGet2(url);

            if (json.IndexOf("errcode") > 0)
            {
                var fs = new Followers();
                fs.error = Util.JsonTo <ReturnCode>(json);
                return(fs);
            }
            else
            {
                return(Util.JsonTo <Followers>(json));
            }
        }