收藏
回答

公众号页面正常授权(snsapi_userinfo)获取不到用户关注公众号信息?

用静默授权能够获取用户关注信息(包括是否关注、关注时间、关注场景)

 报文参数请求字符串: https://api.weixin.qq.com/cgi-bin/user/info?access_token=29_GttRxrbpKhRItUpyx79gbDoSd6P5IBtAJc0p_q2w8gPhyRyvGSb8B7aqPkz2FznaNEWoDZpSWfNShp1oSp55IkVFZs8BJY0eVlY8nXMI8P-dfRmPzKNFLhnAWqtyru1NqJHSf90V0KQrkZz3SDSjADAVGV&openid=oDfgHt-Ydy_JA7GBfk7FU6bPAt-8&lang=zh_CN 

 报文参数响应字符串: {"subscribe":1,"openid":"oDfgHt-Ydy_JA7GBfk7FU6bPAt-8","nickname":"雨","sex":1,"language":"zh_CN","city":"","province":"","country":"冰岛","headimgurl":"http://thirdwx.qlogo.cn/mmopen/9VYYg42nhdZic6qcxKKY2Sr68ibpwADkTTq9lJcwLRiak0txSPib8Ca6icVUqRjyRO0XW0LiaBSS9iaU2BHQAzqKmwUIUb5luvePObb/132","subscribe_time":1571380854,"unionid":null,"remark":"","groupid":0,"tagid_list":[],"subscribe_scene":"ADD_SCENE_SEARCH"} 

但是换成弹出授权框的方式,所有用户的关注信息都获取不到了,但是实际上用户都关注了的

 报文参数请求字符串: https://api.weixin.qq.com/sns/userinfo?access_token=31_fIygA_5ElueDAUpEp8Pppb08uQ-dBZKhm34herEPPCK-UY8JboAqa4vzALKmXMyih5JkOfj6RsmddYjFGBhkRLs6XH9ODPIr-ZMZYCpx11k&openid=oDfgHtyc4a06-bMWNE23VVlfxbpc&lang=zh_CN 

 报文参数响应字符串: {"subscribe":0,"openid":"oDfgHtyc4a06-bMWNE23VVlfxbpc","nickname":"Same","sex":1,"language":"zh_CN","city":"呼伦贝尔","province":"内蒙古","country":"中国","headimgurl":"http://thirdwx.qlogo.cn/mmopen/vi_32/GK3gtEibPGfgIia85Qcr9nwiaIp6OBxxpXM4xanBBu0b2AiaHuZFyJulaLUytmBZ8fwUibh8QKvU2QibD9DXxSofqibqw/132","subscribe_time":0,"unionid":"osU-swsqG5xpqeQo0LbwWBSaUfGw","remark":null,"groupid":0,"tagid_list":null,"subscribe_scene":null} 

回答关注问题邀请回答
收藏

3 个回答

登录 后发表内容
问题标签