D
D
Dmitry2021-10-05 21:16:06
PHP
Dmitry, 2021-10-05 21:16:06

How to hide link on click on Telegram bot php button?

Hello everyone, tell me how to hide the link when you click on the button.
615c96523195f573992849.jpeg

error_reporting(E_ALL);
include('vendor/autoload.php');

$botToken = "mi_token";
$website = "https://api.telegram.org/bot".$botToken;

$content = file_get_contents("php://input");
$update = json_decode($content, TRUE);
$message = $update["message"];

$chatId = $message["chat"]["id"];
$text = $message["text"];

if ($text == '/start') {
  $welcomemessage = 'Сайт';
}

$inline_button1 = array("text"=>"Перейти на сайт","url"=>"https://saytik123123123.ru/");
$inline_keyboard = ;
$keyboard=array("inline_keyboard"=>$inline_keyboard);
$replyMarkup = json_encode($keyboard);

file_get_contents($website."/sendmessage?chat_id=".$chatId."&text=".$welcomemessage.'&reply_markup=' . $replyMarkup );

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2021-10-05
@dmitriy8720

No, if the button should open the site.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question