第三方平台为授权的小程序帐号上传小程序代码报47001问题
-
首先,Post数据要求ext_json需为string类型,
-
其次, extJson传入后端时,要确保【"】双引号未被转译为【& q u o t ;】,
-
最后,检查下数据传参名字是否写错,例ext_json在这个接口是以【_】连接命名而不是驼峰式。
JSONObject json = new JSONObject();
json.accumulate(“template_id”, templateId);
json.accumulate(“ext_json”, extJson);
json.accumulate(“user_version”, userVersion);
json.accumulate(“user_desc”, userDesc);
String retStr = HttpsUtil.post(url, json.toString()); -
这样就可以基本避免出现47001了。