- 用户扫带参数二维码关注公众号,公众号推送数据的参数EventKey并没有包含扫码的参数?
用户通过扫带参数的二维码关注公众号,公众号推送数据的参数里Event是subscribe,但EventKey并没有包含扫码的参数,subscribe_scene应该是ADD_SCENE_QR_CODE,但是会出现ADD_SCENE_SEARCH,ADD_SCENE_OTHERS,ADD_SCENE_CHANNELS,也会出现ADD_SCENE_QR_CODE,但是EventKey依旧是空 appid:wxb87912b1166eef72 带参数二维码: [图片] 公众号返回扫码关注数据,EventKey为空,无返回参数: 2022-11-24 12:45:22 'data' => array ( 'ToUserName' => 'gh_efc77ca8c7ac', 'FromUserName' => 'omt27uIB29DuyyxaTsmN_PKIGhhM', 'CreateTime' => '1669265121', 'MsgType' => 'event', 'Event' => 'subscribe', 'EventKey' => NULL, ) 通过FromUserName获取客户数据 array ( 'subscribe' => 1, 'openid' => 'omt27uIB29DuyyxaTsmN_PKIGhhM', 'nickname' => '', 'sex' => 0, 'language' => 'zh_CN', 'city' => '', 'province' => '', 'country' => '', 'headimgurl' => '', 'subscribe_time' => 1669265121, 'unionid' => 'oAndb6fB9q-tmv2wxiDVQmDBJ7rs', 'remark' => '', 'groupid' => 0, 'tagid_list' => array ( ), 'subscribe_scene' => 'ADD_SCENE_SEARCH', 'qr_scene' => 0, 'qr_scene_str' => '', 'app_id' => 'wxb87912b1166eef72', ) 同一个用户重新识别二维码,成功返回,2022-11-24 12:45:50 array ( 'ToUserName' => 'gh_efc77ca8c7ac', 'FromUserName' => 'omt27uIB29DuyyxaTsmN_PKIGhhM', 'CreateTime' => '1669265150', 'MsgType' => 'event', 'Event' => 'SCAN', 'EventKey' => 'id_user=50022&bra_id=284&from_type=wx', 'Ticket' => 'gQFM8TwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyRk5LWFY2cXRhWFUxMDAwMHcwN0cAAgTy8stiAwQAAAAA', ) 能帮忙跟进处理下么,这种情况特别多
2022-11-25 - 公众号生成带参数二维码,扫描生成的二维码后台接收到的信息没scene_str ?
公众号生成带参数二维码,采用{"action_name": "QR_LIMIT_STR_SCENE", "action_info": {"scene": {"scene_str": "test"}}}格式,步骤如下: 1、POST https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token={0},获取到{"ticket":"gQGi8TwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyUU82bG8wdkhmREQxeGkzczFBMUwAAgTSyJJkAwSAOgkA","expire_seconds":604800,"url":"http://weixin.qq.com/q/02QO6lo0vHfDD1xi3s1A1L"} 2、通过ticket换取二维码 GET https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQGi8TwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyUU82bG8wdkhmREQxeGkzczFBMUwAAgTSyJJkAwSAOgkA 以上两个步骤都成功,扫描scene_str值不一样的二维码图片,后台接收到的信息一样,且没有看到参数scene_str,如下: <xml><ToUserName><![CDATA[gh_34cc79c09e6c]]></ToUserName> <FromUserName><![CDATA[on2vn59fH3FvhZZPNG_YvUzJEENk]]></FromUserName> <CreateTime>1687340674</CreateTime> <MsgType><![CDATA[event]]></MsgType> <Event><![CDATA[SCAN]]></Event> <EventKey><![CDATA[0]]></EventKey> <Ticket><![CDATA[gQGD8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyckJOdm9FdkhmREQxSkM3aWhBMXMAAgQ6xpJkAwQsAQAA]]></Ticket> </xml> 请指导下,问题出在哪里?另外第一个步骤里获取到的url,开发者可根据该地址自行生成需要的二维码图片,指导下如何自行生成,谢谢。
2023-06-21