微信客服消息

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/jmlxx/article/details/80524749

public static function getMsg5($openid){
        return '{
                                "touser":"'.$openid.'",
                                "msgtype":"news",
                                "news":{
                                    "articles": [
                                     {
                                         "title":"动动手指,获取点亮指数",
                                         "description":"动动手指,获取点亮指数",
                                         "url":"",
                                         "picurl":""
                                     }
                                     ]
                                }
                            }';
    }
$sKefuData= WeixinController::getMsg1($openid);
WeixinController::getSendMsg($sKefuData);
//客服消息
    public static function getSend($data){
        $accessToken = self::getAccessToken();
        $url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=".$accessToken;
        $res = json_decode(self::httpGet($url,$data));
        return $res;
    }

猜你喜欢

转载自blog.csdn.net/jmlxx/article/details/80524749