微信 模板消息的使用
来源:互联网 发布:linux search file 编辑:程序博客网 时间:2024/06/03 06:35
public static boolean sendTemplateMessage(String accessToken, String jsonMsg){logger.info("消息内容:{"+jsonMsg+"}");boolean result = false;//请求地址String requestUrl = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN";requestUrl = requestUrl.replace("ACCESS_TOKEN", accessToken);//发送模板消息JSONObject jsonObject = WeixinUtil.httpRequest(requestUrl, "POST", jsonMsg);if(null != jsonObject){int errorCode = jsonObject.getInt("errcode");String errorMsg = jsonObject.getString("errmsg");if(0 == errorCode){result = true;logger.info("模板消息发送成功errorCode:{"+errorCode+"},errmsg:{"+errorMsg+"}");System.out.println("模板消息发送成功errorCode:{"+errorCode+"},errmsg:{"+errorMsg+"}");}else{logger.info("模板消息发送失败errorCode:{"+errorCode+"},errmsg:{"+errorMsg+"}");System.out.println("模板消息发送失败errorCode:{"+errorCode+"},errmsg:{"+errorMsg+"}");}}return result;}
1 0
- 微信 模板消息的使用
- java微信模板消息接口的使用
- 微信公众号开发---消息模板的使用
- 微信公众号模板消息使用
- 微信模板消息
- 微信模板消息
- 微信消息模板的配置
- 微信的模板消息推送
- 微信模板消息示例
- 微信开发 模板消息
- 微信模板消息换行
- 微信发送模板消息
- 微信模板消息推送
- 发送微信模板消息
- 微信消息模板php
- 微信模板消息发送
- 微信模板消息换行
- 微信发送模板消息
- 最大公约数
- 九度OJ 1503:二叉搜索树与双向链表
- gcc参数详解
- XQuery Reference
- UMeng"Application received signal SIGSEGV"错误分析
- 微信 模板消息的使用
- 享元模式(flyweight)
- 可靠传输UDP库汇总
- Longest Substring with At Most Two Distinct Characters
- java实现约瑟夫环
- 解决ViewPager上不同Fragment不同Option Menu错乱
- 黑马程序员---Foundation框架
- 项目中遇到的问题总结
- unicode 与 ansi问题