微信客服訊息
阿新 • • 發佈:2018-12-01
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;
}