用户关注公众号后,怎么获取用户信息?

小程序 文章 2022-02-28 22:20 1251 0 全屏看文

AI助手支持GPT4.0

用户关注公众号后,怎么获取用户信息?After users follow the official account, how to obtain user information?

用户关注公众号后,怎么获取用户信息?

用户关注公众后,从回调中能拿到openId,再根据openId调用获取用户信息的接口(https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN),也只能拿到unionId,nickname和headimgurl返回的都是空字符串,现在要怎么获取用户头像和昵称呢?

After paying attention to the public, the user can get openid from the callback, and then call the interface to obtain user information according to openid( https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN ), you can only get unionid. Nickname and headimgurl return empty strings. Now how do you get the user's Avatar and nickname?

回答:

拾忆:

目前只能通过用户授权获取。

梁茹娃~血:我的微信扫码,不能扫

-EOF-

AI助手支持GPT4.0