You can use flex message for sending url text. https://developers.line.biz/ja/reference/messaging-api/#button
So you should change like following.
$messages = json_decode(<<< EOS
[{
"type": "flex",
"altText": "test",
"contents": {
"type": "bubble",
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "text",
"text": "hello"
},
{
"type": "button",
"action": {
"type": "uri",
"label": "Open Zoom Meeting",
"uri": "https://accent-language.com"
},
"style": "primary",
"color": "#0000ff"
}
]
}
}
}]
EOS
);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'to' => $line_id,
'messages' => $messages,
]));
- 0