参考接口使用文档:
使用以下代码发起 get 请求,返回数据中 productList 为空数组
{"errcode":0,"errmsg":"ok","productList":[],"total":29548,"next":20}
static void getWxGoods() throws IOException {
String url="https://api.weixin.qq.com/union/promoter/product/list";
Map<String, Object> params=new HashMap<>();
params.put("access_token","正确的token");
params.put("from","0");
params.put("limit","20");
params.put("query","牙膏");
System.out.println(params);
try {
doGet2(url,params);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
微信小店的商品用这个:https://developers.weixin.qq.com/doc/store/API/product/list_get.html
你是刚开发吧?这个产品都没人维护了!关注下最新的联盟带货机构。