【发布时间】:2022-12-07 07:55:04
【问题描述】:
有没有办法通过单击按钮从频道打开 Telegram 中的 Web 应用程序?也就是说,算法是什么?
将机器人添加到频道 机器人发送带有按钮的消息 用户单击按钮,应用程序在 Telegram 中打开
问题:没有发送带有右键的消息。错误:
[error_code] => 400
[description] => Bad Request: BUTTON_TYPE_INVALID
我的代码:
$telegram = new Telegram($bot_api_key, $bot_username);
$keyboard = [
"inline_keyboard" => [
[
[
'text' => 'Open App',
'web_app' => ['url' => 'https://test.com/bot.php'],
]
]
]
];
$result = Request::sendMessage([
'chat_id' => $chat_id,
'parse_mode' => 'markdown',
'text' => 'Test message',
'reply_markup' => $keyboard
]);
【问题讨论】: