收藏
回答

公众号生成临时二维码,回调参数EventKey没有值?

【请求地址】: https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=38_E1tuvxvJvLtUiNL7xSbFtH1dAhoEquWeN0lS82W7q5JBYz3trOZlD3Zbw_x_6yigzvKsBhFAvjPZkE1R1m7G46F1FNZlqt-rlBRqnvIvIlp8MKyUIETRdyn3L9jAJWxHGxIIrHUYv_6XOw0bTQEcAEDEBP

【请求参数】:{"action_name":"QR_STR_SCENE","expire_seconds":10800,"action_info":{"scene":{"scene_str":"gift_1298439407299280897"}}}

【响应数据】:{"ticket":"gQEw8TwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyWkFTcmgyNDRkMjAxTEJ2dzF2Y1gAAgS1taBfAwQwKgAA","expire_seconds":10800,"url":"http:\/\/weixin.qq.com\/q\/02ZASrh244d201LBvw1vcX"}

根据产生的二维码,关注公众号。


{"allFieldsMap":{"CreateTime":"1604367805","EventKey":"","Event":"subscribe","ToUserName":"gh_23f2d6a925d5","FromUserName":"oBERCwMXSsoM612rWNOnPKok14Wk","MsgType":"event"},"createTime":"1604367805","event":"subscribe","eventKey":"","fromUser":"oBERCwMXSsoM612rWNOnPKok14Wk","hardWare":{},"msgType":"event","scanCodeInfo":{},"sendLocationInfo":{},"sendPicsInfo":{"picList":[]},"toUser":"gh_23f2d6a925d5"}



EventKey中的值为空。

最后一次编辑于  2020-11-04
回答关注问题邀请回答
收藏

3 个回答

  • 最菜
    最菜
    2022-01-05

    我也也到这个问题,我是把获取带参数二维码的 action_name 写成 QR_STR_SCENE,而我的scene_id 是数字,换成 整型参数值 QR_SCENE 就有值了

    2022-01-05
    有用
    回复
  • 张云笙[好的]
    张云笙[好的]
    2021-01-15

    同问


    开发语言:php

    $data = [
                "action_name" => "QR_LIMIT_SCENE",
                "action_info" => [
                    "scene" => [
                        "scene_str" => "whiteList_".$cmid
                    ]
                ]
            ];
            $rs = $qr->create($token, json_encode($data));
    
    




    结果

    <xml><ToUserName><![CDATA[xxxxxxxxxxxxxxxxxxxxx]]></ToUserName>

    <FromUserName><![CDATA[xxxxxxxxxxxxxxxxxxxxxxxxxxxxx]]></FromUserName>

    <CreateTime>1610698264</CreateTime>

    <MsgType><![CDATA[event]]></MsgType>

    <Event><![CDATA[SCAN]]></Event>

    <EventKey><![CDATA[0]]></EventKey>

    <Ticket><![CDATA[xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]]></Ticket>

    </xml>

    2021-01-15
    有用
    回复
  • 中国制造
    中国制造
    2020-11-03

    没人,我顶顶。

    2020-11-03
    有用
    回复
登录 后发表内容
问题标签