批量自动添加公众号,并将消息推送至微信公众号。
关注公众号:
public Response verifyuser(String user_name){
Request request = new Request();
request.URL = WXContant.verifyUserUrl(host,this.Skey);
request.Method = “POST”;
request.requestBody = “{“BaseRequest”:{“Uin”:””+this.Uin+””,”Sid”:””+this.Sid+””,”Skey”:””+this.Skey+””,”DeviceID”:””+this.DeviceID+””},”Opcode”:1,”VerifyUserListSize”:1,”VerifyUserList”:[{“Value”:””+user_name+””,”VerifyUserTicket”:””}],”VerifyContent”:””,”SceneListCount”:1,”SceneList”:[0]}”;
System.out.println(“request.requestBody:”+request.requestBody);
return sendRequest(request);
}
发送消息:
public Response sendmsg(String toUserName){
Request request = new Request();
request.URL = WXContant.sendmsgUrlUrl(host,this.Sid, this.Skey);
request.Method = “POST”;
request.requestBody = “{“BaseRequest”:{“Uin”:””+this.Uin+””,”Sid”:””+this.Sid+””,”Skey”:””+this.Skey+””,”DeviceID”:””+this.DeviceID+””},”Msg”:{“FromUserName”:””+this.fromUserName+””,”ToUserName”:””+toUserName+””,”Type”:1,”Content”:”微信361(www.vx361.com)-微信公众账号大全,微信公众号导航平台,收录最新最全有趣的、好玩的、有意思的、实用的微信订阅号以及微信服务号,为你推荐最值得关注的微信公众号”,”ClientMsgId”:”+WXContant.currentTimeMillis+”,”LocalID”:”+WXContant.currentTimeMillis+”}}”;
return sendRequest(request);
}
现已开发出新的采集公众号文章的方法,程序用c#编写,支持微信多开,当关注的公众号发布文章时,程序立即采集文章内容及图片,插入到数据库或者提交到接口!
微信交流 weixinhook
最新评论