I've created a bot in PHP in Telegram where I've 2 buttons inline. I receive right the click but after how I can send back another message? With the code below I can send a message but it doesn't work in this case.
$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;
}