Answer the question
In order to leave comments, you need to log in
How to send keyboard to telegram-bot-sdk (3.2)?
Version 2 documentation: https://telegram-bot-sdk.readme.io/docs/keyboards
$keyboard = [
['7', '8', '9'],
['4', '5', '6'],
['1', '2', '3'],
['0']
];
$reply_markup = $telegram->replyKeyboardMarkup([
'keyboard' => $keyboard,
'resize_keyboard' => true,
'one_time_keyboard' => true
]);
$response = $telegram->sendMessage([
'chat_id' => 'CHAT_ID',
'text' => 'Hello World',
'reply_markup' => $reply_markup
]);
$messageId = $response->getMessageId();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question