使用wx.login 换取的结果里 openid和unionid为何为null?

发布于 5 年前作者 motao9173 次浏览最后编辑 5 年前来自 issues

先调用getUserProfile,然后拿code 去调用wx.login

3 回复
bzhang
bzhang1 楼5 年前
wx.login 对应的https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code
这个接口换出openid unionid
syuan
syuan2 楼5 年前

看我的文章,出现相同问题,官方已回复

chaosun
chaosun3 楼7 个月前

如果只需要openid和unionid的话,只调用wx.login就可以了