In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to manage the concerned users in the development of asp.net Wechat", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to manage the users you have followed in the development of asp.net Wechat.
The official account can obtain the follower list of the account through this API. The follower list consists of a string of OpenID (encrypted WeChat account, each user's OpenID is unique to each official account). An OpenID that pulls up to 10000 followers at a time can be pulled multiple times to meet the demand.
API call request description
Http request method: GET (please use https protocol)
Return description
Return JSON packet when correct:
Return JSON packet when error occurs (invalid AppID error for example):
{"errcode": 40013, "errmsg": "invalid appid"}
Attachment: when the number of followers exceeds 10000
When the number of followers of the official account exceeds 10,000, you can fill in the value of next_openid and pull the list many times to meet the demand.
Specifically, when the interface is called, the next_ OpenID value returned from the previous call is taken as the next_ OpenID value in the next call.
Examples are as follows:
Public account A has 23000 followers. If you want to get all the followers by pulling the follower API, request url as follows:
Https://api.weixin.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN
Return the result:
{"total": 23000, "count": 10000, "data": {"openid": ["OPENID1", "OPENID2",..., "OPENID10000"]}, "next_openid": "OPENID10000"}
Https://api.weixin.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID1
Return the result:
{"total": 23000, "count": 10000, "data": {"openid": ["OPENID10001", "OPENID10002",..., "OPENID20000"]}, "next_openid": "OPENID20000"}
Https://api.weixin.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID2
Return the result (when the follower list has been returned, the return next_openid is empty):
{"total": 23000, "count": 3000, "data": {"openid": ["OPENID20001", "OPENID20002",..., "OPENID23000"]}, "next_openid": "OPENID23000"}
In the permission table of the interface at the backend of Wechat's official website (take the service number as an example), the user list can be obtained 500 times a day, and the basic user information can be obtained 500000 times a day, so next, when I get the user list, I will use the cache.
But the real use is extremely fast, the first effect is as follows:
First, let's take a look at the user list. The official website says that getting a user's list returns groups of openID. For this feature, I did this.
Create a class for storing openId
Public class WxOpenIdInfo {public string WxopenId {get; set;} / / the openId where users store Wechat users
Then create a basic class of user information
/ / Wechat user basic information class / / public class WxUserInfo {public int subscribe {get; set;} / / follow status public string openid {get; set;} / / OpenID public string nickname {get; set;} / / nickname public string sex {get; set;} / / gender public string city {get; set;} / / City public string province {get; set;} / / Provincial public string headimgurl {get; set } / / profile picture address public string subscribe_time {get; set;} / / follow time public string remark {get; set;} / / remarks public string groupid {get; set;} / / grouping ID}
User list foreground code
# title {width:100%; height:40px;margin-top:10px; text-indent:5px; line-height:40px;} .checkstyle {float:left;} # DDlAddgroups {text-align:center; width:161px; border:1px solid # d9d9d9; border-radius:5px; height:35px; line-height:35px; font-weight:bold; text-align:center; float:left; margin:auto 5px auto 5px;} .DDlAddgroups {text-align:center; width:161px; border:1px solid # d9d9d9; border-radius:5px; height:35px Line-height:35px; font-weight:bold; text-align:center; float:left; margin:auto 5px auto 5px;} # DDLgroups {text-align:center; width:111px; border:1px solid # d9d9d9; border-radius:5px; height:35px; line-height:35px; font-weight:bold; text-align:center; float:left; margin:auto 5px auto 5px;} .newGroups {margin:auto 5px auto 5px;} .inputstyle {height:35px; line-height:35px; text-indent:5px; width:280px Background-image:url ('images/inputbg.gif'); background-repeat:repeat-x;border-top:solid 1px # a7b5bc; border-left:solid 1px # a7b5bc; border-right:solid 1px # ced9df; border-bottom:solid 1px # ced9df; float:left; margin:auto 5px auto 5px;} .wxusertab {border:1px solid # d9d9d9; width:100%; text-align:left; text-indent:5px;} th {height:35px;background-image:url (' images/th.gif'); background-repeat:repeat-x } td {border-bottom:1px solid # d9d9d9;} .trcolor {background-color:#ecd9df;} tr:hover {cursor:pointer;} # FenPage {width:1124px; height:25px; line-height:25px; text-align:center; margin:20px auto 20px auto;} .linka {color:#0094ff; cursor:pointer;} .fenyebtn {width:60px; height:25px; border:1px solid # ced9df; border-radius:5px; text-align:center; line-height:25px; float:right } .fenyebtn2 {width:60px;height:25px; border:1px solid # ced9df; border-radius:5px; text-align:center; line-height:25px;margin-left:10px;float:right;} .toPageIndex {width:60px;height:25px; background-image:url ('images/inputbg.gif'); margin-left:10px; background-repeat:repeat-x;border-top:solid 1px # a7b5bc; border-left:solid 1px # a7b5bc; border-right:solid 1px # ced9df; border-bottom:solid 1px # ced9df Text-align:center; float:right;} .gotoPagebtn {width:60px; height:25px; border:1px solid # ced9df; border-radius:5px; text-align:center; line-height:25px;margin-left:10px;float:right; background-color:#ced9df;} .deletebtn {float:left;width:100px; color:#000; height:25px; background-color:#ced9df; border:1px solid # ced9df; border-radius:5px; text-align:center;} a {color:#08a5e0 } .droplist {background-image:url ('images/inputbg.gif'); background-repeat:repeat-x; width:120px; height:25px; border:1px solid # ced9df;} .checkstyle {float:left;} .imgheadstyle {width:50px; height:50px; margin-top:10px;} .lbsubscribeCount {font-size:26px;} # shownewgroup {width:300px; height:200px; background-color:white;z-index:9999; border:2px solid # DDD; top:40%; left:40% Background-color:#fff; position:fixed;margin:-100px auto auto-100px; display:none;} # shownewgroupzhezhaoceng {height:200%; width:200%; left:0px; top:0px;position:fixed; zmuri index 9998; background:rgb (50meme 50); background:rgba (0meme 0meme 0meme 0.5); display:none;} .closeLogin {height:30px; border-bottom:2px solid # 31bb34; text-align:right; line-height:30px; font-size:14px; font-weight:bold } a:hover {cursor:pointer;} # updateremark {width:300px; height:200px; background-color:white;z-index:9999; border:2px solid # DDD; top:40%; left:40%; background-color:#fff; position:fixed;margin:-100px auto auto-100px; display:none;} # updateremark_zhezhaoceng {height:100%; width:100%; left:0px; top:0px;position:fixed; z indexvir 9998; background:rgb (50pr 50); background:rgba Display:none;} $(document) .ready (function () {$(".newGroups") .click (function () {$("# shownewgroupzhezhaoceng"). Show (); $("# shownewgroup") .show ();}), $('.closeloginpage') .click (function () {$("# shownewgroupzhezhaoceng") .click (); $("# shownewgroup"). Hide () })}) location: home Wechat Management Deqiao employee Service Center-follower list Management New grouping closed within 30 characters to determine the number of followers all selected + New grouping Management refresh OpenID header Like nickname (remark name), follow the group name to which the group operation belongs, modify the group name, confirm the remark name > > | >
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 226
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.