post数据
{
"touser":"oufyi0tu6QsyyAunyfTyFN_2f4-o",
"template_id":"OIi9YwszNbT37_nKy5mblQegz3mJNtfXqRb7BfULrGY",
"url":"http://weixin.qq.com/download",
"data":{
"first": {
"value":"恭喜你购买成功!",
"color":"#173177"
},
"keyword1":{
"value":"巧克力",
"color":"#173177"
},
"keyword2": {
"value":"39.8元",
"color":"#173177"
},
"keyword3": {
"value":"2014年9月22日",
"color":"#173177"
},
"keyword4": {
"value":"2014年9月22日",
"color":"#173177"
},
"remark":{
"value":"欢迎再次购买!",
"color":"#173177"
}
}
}
===
{
undefined undefined"errcode": 0,
undefined undefined"errmsg": "ok",
undefined undefined"msgid": 515337268777467900
undefined}
//之前使用gson 以为是gson 的问题。发现我单纯将api 和json 的数据发送也是一样的。请问怎么解决?
https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=14__9a129uy5li7du6IWMOdB4fNxce7PqPW6gHk-tS3JFEWpSPkgp__kkxnLeMrWGg-p5I1Nrz-gqP76ek86lnkbJowVNpJumRM_ATfeK0kAgzx1mpE4HCJW9XNv_RqDWi55AX_fz-
access_token 隐藏部分
{
"touser": "oufyi0tu6QsyyAunyf",
"msgtype": "text",
"text": {
"content": "h"
}
}
post 客服消息就可以。