小程序session_key解析的nickName是微信用户?

小程序 文章 2022-03-17 16:00 655 0 全屏看文

AI助手支持GPT4.0

小程序session_key解析的nickName是微信用户?Is the nickName parsed by the applet session_key a WeChat user?

小程序session_key解析的nickName是微信用户?

我用开发工具 先调用wx.login取到了code

之后我调用wx.getUserInfo 取到了匿名的用户信息 encryptedData iv

然后用code去后台取到了 openid和 session_key

之后用session_key 解密encryptedData 得到的用户信息和前台接口取到的一样 都是微信用户 ?

是开发工具无法获取到用户信息 还是不能用getUserInfo来取用户信息? 必须要用户点击按钮触发getUserProfile方法才能获取到用户信息么?

I use the development tool to call Wx After login gets the code, I call Wx GetUserInfo gets the anonymous user information encrypteddata IV, and then uses code to get openid and session in the background_ Use session after key_ The user information obtained by key decrypting encrypteddata is the same as that obtained by the foreground interface. Are they wechat users? Is the development tool unable to obtain the user information, or cannot use getUserInfo to obtain the user information? Must the user click the button to trigger the getuserprofile method to obtain the user information?

回答:

青寒:

必须要用户点击按钮触发getUserProfile方法才能获取到用户信息

-EOF-

AI助手支持GPT4.0