как работать со встроенной кнопкой с Telegram API, используя PHP - PullRequest
0 голосов
/ 01 мая 2019

У меня проблемы с работой встроенной кнопки, моя проблема в том, что я не знаю, что делать с обратным вызовом запроса, может ли кто-нибудь помочь мне использовать его

вот мой код

<?php
include (__DIR__ . '/vendor/autoload.php');
include 'Telegram.php';
$telegram = new Telegram('567725887:AAHSXeASo7ykp1E5xjSfjKlj4orbCyrG29Q');
$chat_id = $telegram->ChatID();



$option = array( 
    //First row


 array($telegram->buildInlineKeyBoardButton("Button 1", $url="http://link1.com"), $telegram->buildInlineKeyBoardButton("Button 2", $url="http://link2.com")), 
    //Second row 
    array($telegram->buildInlineKeyBoardButton("Button 3", $url="http://link3

.com"), $telegram->buildInlineKeyBoardButton("Button 4", $url="http://link4.com"), $telegram->buildInlineKeyBoardButton("Button 5", $url="http://link5.com")), 
    //Third row
    array($telegram->buildInlineKeyBoardButton("Button 6", $url="http://link6.com")) );
$keyb = $telegram->buildInlineKeyBoard($option);
$content = array('chat_id' => $chat_id, 'reply_markup' => $keyb, 'text' => "This is a Keyboard Test");
$telegram->sendMessage($content);
...