已解决,直接把提取的链接,编码下,在发给别人就行了
//转发小程序
public function SendLinkMsg ($who,$targetid,$receivedUrl,$url){
$data = [
"event"=>"SendLinkMsg",
"robot_wxid"=>$who,//用哪个机器人发
"to_wxid"=>$targetid,//发到哪里
"msg"=> [
'target_url' => $receivedUrl
]
];
//将数组转换为 JSON
$jsonData = json_encode($data, JSON_UNESCAPED_UNICODE);
//调用 curl 方法
$response=$this->curl($url, $jsonData);
$response=json_decode($response);
return $response;
}