me.chanjar.weixin.cp.api.WxCpServiceImpl这个类 oauth2getUserInfo方法有问题 以下是原码 @Override public String[] oauth2getUserInfo(Integer agentId, String code) throws WxErrorException { String url = "https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo?" + "code=" + code + "&agentid=" + agentId; String responseText = get(url, null); JsonElement je = new JsonParser().parse(responseText); JsonObject jo = je.getAsJsonObject(); return new String[]{GsonHelper.getString(jo, "UserId"), GsonHelper.getString(jo, "DeviceId"), GsonHelper.getString(jo, "OpenId")}; } 但是微信文档中说明了根据code获取成员信息 url参数已经改为了access_token,code,agentid 例如:https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo?access_token=ACCESS_TOKEN&code=CODE&agentid=AGENTID 详见http://qydev.weixin.qq.com/wiki/index.php?title=%E6%A0%B9%E6%8D%AEcode%E8%8E%B7%E5%8F%96%E6%88%90%E5%91%98%E4%BF%A1%E6%81%AF 那么显然这里的处理是有问题的 @binarywang
Activity
constanine commentedon Apr 18, 2017
抱歉没看到后面executeInteranl的方法,不管如何都会带上accesstoken