I am realizing my bot telegram with a game. I wrote this:
$content = file_get_contents("php://input"); $update = json_decode($content, true); if(!$update) { exit; } $chatId = isset($message['chat']['id']) ? $message['chat']['id'] : ""; header("Content-Type: application/json"); $parameters = array('chat_id' => $chatId); $parameters["method"] = "sendGame"; $parameters["game_short_name"] = "prova"; $parameters["text"] = parse_url("<my_html_5_url>"); $message = json_encode($parameters); echo json_encode($parameters);
My sample html5 code is:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title of the document</title> </head> <body> Content of the document...... </body> </html>
When I call the game, I only see the image inserted by Botfather, but I have no chance to see my html5. Where am I wrong?