用java代码通过OAuth授权获取openid,有时会返回invalid code错误,有时不会。具体是什么原因?求大神们解答
errcode 是什么
先看获取的code对吗,不对的话重新获取code,
获取code的链接:“https://open.weixin.qq.com/connect/oauth2/authorize?appid=xxxxxx&redirect_uri=xxxxxx&response_type=code&scope=snsapi_base&state=state#wechat_redirect”。
注:code可能过期了
http://m.315ewm.cn/Index/hdcode/api/wz3bt38h/wxid/67/hdid/860.html