Callback query не работает.
Я использую
https://github.com/TelegramBot/Api.
public function actionMybigbot(){
$token = '*************************************************';
$bot = new Client($token);
$bot->on(function ($update) use ($bot) {
$message = $update->getMessage();
$text = $message->getText();
$chat_id = $update->getMessage()->getChat()->getId();
$keyboardQuest = [
['text'=>'1-Савол','callback_data'=>'q1'],
['text'=>'2-Савол','callback_data'=>'q2'],
['text'=>'3-Савол','callback_data'=>'q3'],
['text'=>'4-Савол','callback_data'=>'q4'],
['text'=>'5-Савол','callback_data'=>'q5'],
];
switch ($text){
case '/start':
$keyboard = new \TelegramBot\Api\Types\ReplyKeyboardMarkup(array(array("Savollar", "Javoblar")), true,true);
$bot->sendMessage($chat_id, 'awdawd',null,false,null,$keyboard);
break;
case 'Savollar':
$keyboard = new \TelegramBot\Api\Types\Inline\InlineKeyboardMarkup(array($keyboardQuest));
$bot->sendMessage($chat_id, 'Savollardan birini tanlang!',null,false,null,$keyboard);
break;
}
},function($message){ return true;});
$bot->callbackQuery(function ($callbackQuery) use ($bot) {
$bot->sendMessage($chat_id, 'Savollardan birini tanlang!');
});
$bot->run();
}