小程序與小游戲使用wx.getUserInfo 接口直接彈出授權框的開發方式將逐步不再支持


各位小程序開發者注意了:從2018年4月30日開始,小程序與小游戲的體驗版、開發版調用 wx.getUserInfo 接口,將無法彈出授權詢問框,默認調用失敗。正式版暫不受影響。開發者可使用以下方式獲取或展示用戶信息:

一、小程序
1、使用 button 組件,並將 open-type 指定為 getUserInfo 類型,獲取用戶基本信息。
詳情參考文檔:
https://developers.weixin.qq.com/miniprogram/dev/component/button.html
2、使用 open-data 展示用戶基本信息。
詳情參考文檔:
https://developers.weixin.qq.com/miniprogram/dev/component/open-data.html

二、小游戲
1、使用用戶信息按鈕 UserInfoButton。
詳情參考文檔:
https://developers.weixin.qq.com/minigame/dev/document/open-api/user-info/wx.createUserInfoButton.html
2、開放數據域下的展示用戶信息。
詳細參考文檔:
https://developers.weixin.qq.com/minigame/dev/document/open-api/data/wx.getUserInfo.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM