小程序
小游戏
企业微信
微信支付
扫描小程序码分享
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
你好,可根据以下方式排查问题:
1、是否采用post请求方式
2、是否已经把unicode转为utf-8
(参考链接:https://www.jb51.net/article/70251.htm)
3、内容安全监测主要是覆盖涉政,色情,违法这几类
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
你好,可根据以下方式排查问题:
1、是否采用post请求方式
2、是否已经把unicode转为utf-8
(参考链接:https://www.jb51.net/article/70251.htm)
3、内容安全监测主要是覆盖涉政,色情,违法这几类
CloseableHttpResponse response = null;
HttpPost request = new HttpPost("https://api.weixin.qq.com/wxa/msg_sec_check?access_token=" + jo.getString("access_token"));
request.addHeader("Content-Type", "application/json");
Map
map.put("content",content);
String body = com.alibaba.fastjson.JSONObject.toJSONString(map);
request.setEntity(new StringEntity(body,ContentType.create("text/json", "UTF-8")));
response = httpclient.execute(request);
HttpEntity httpEntity = response.getEntity();
String result = EntityUtils.toString(httpEntity, "UTF-8");// 转成string
com.alibaba.fastjson.JSONObject jso = com.alibaba.fastjson.JSONObject.parseObject(result);
String errCode = jso.getString("errcode");//错误码 0正常 87014内容含有错误信息