I have an application that uses UnionID Mechanism to get user info (nickname, language code). After researching, According to WeChat's official description, this method will no longer output user information after 12/27/2021. ( https://i.stack.imgur.com/NmtDc.png ) https://developers.weixin.qq.com/doc/offiaccount/User_Management/Get_users_basic_information_UnionID.html
Do we have another way to get user info (nickname, language code)? I suffer from this issue for a long time. Thank you so much for your help.
Using button component with "open-type"="getUserInfo".And then you will get userInfo in "bindgetuserinfo" function.
<button bindgetuserinfo="handleGetUserInfo" open-type="getUserInfo">getUserInfo</button>
new Page({
handleGetUserInfo(e){
console.log(e)
//...some code
}
})
docs:developers.weixin.qq.com/miniprogram/dev/component/button.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.