通过wx.getUserProfile获取用户信息授权获取不到?
发布于 4 年前 作者 qiaojing 5974 次浏览 来自 官方Issues

wx.getUserProfile()获取用户信息 但是res.authSetting[‘scope.userInfo’] 获取不到 一直是undefined是怎么回事

1 回复

周知:getUserInfo 开发版 & 体验版 已对齐 getUserInfo 匿名表现,正式版将于 4月13日 正式对齐 getUserInfo 匿名表现。请开发者使用 getUserProfile 获取用户信息。开发版 & 体验版 scope.userInfo 调整将于 4月13日 对齐。

pc微信暂不支持wx.getUserProfile,可以参考示例代码进行兼容

https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html#%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81

小程序登录、用户信息相关接口调整说明:https://developers.weixin.qq.com/community/develop/doc/000cacfa20ce88df04cb468bc52801

回到顶部