判断是否关注公众号

2020-09-0420:15:40来源:啊福 评论 817 views

根据 openid 和 access_token,用get方式来请求以下地址:

https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID

返回的 json 中 subscribe=0 就是没关注,subscribe=1 就是已经关注。

官方文档说明:

https://developers.weixin.qq.com/doc/offiaccount/User_Management/Get_users_basic_information_UnionID.html

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: