How to set the URL of the created game in Telegram BotFather?

I created a new game in BotFather Telegram. But about the game link did not arise. In addition, there are no parameters for setting the game URL in the sendGame function. How can I install my gameUrl behind a created game in BotFather?

I have to say that I am using the Microsoft Bot Framework to develop my bot.

+4
source share
2 answers

They say you should use the answerCallbackQuery method

", . @Botfather, URL-, - , , callback_game.

, telegram.me/your_bot?start=XXXX, ."

0

i :

if(isset($update["callback_query"])) {
  $parameters["method"] = "answerCallbackQuery";
  $parameters["callback_query_id"] = $update["callback_query"]["id"];
  $parameters["url"] = "<url_game>";
  echo json_encode($parameters);
}

$parameters = array('chat_id' => $chatId);
// method è il metodo per l'invio di un messaggio (cfr. API di Telegram)
$parameters["method"] = "sendGame";
$parameters["game_short_name"] = "prova";

: . callback_query, . URL- html5-

0

Source: https://habr.com/ru/post/1657423/


All Articles