我已經在電報中創建了一個PHP中的bot,我有2個按鈕內聯。 我收到正確的點擊,但在如何發送回另一條消息之後? 使用下面的代碼我可以發送消息,但在這種情況下它不起作用。電報php:答覆一個callback_query
$content = file_get_contents("php://input");
$update = json_decode($content, true);
if(!$update) {
exit;
}
header("Content-Type: application/json");
$chatId = isset($message['chat']['id']) ? $message['chat']['id'] : "";
$callback_query = isset($update['callback_query']) ? $update['callback_query'] : "";
if($callback_query["data"]=='1'){
$parameters = array('chat_id' => $chatId, "text" => '1');
$parameters["method"] = "sendMessage";
echo json_encode($parameters);
exit;
}