I am working on a telegram bot using php, I want to resize my ReplyKeyboardMarkup button to fit each of the keyboards.
I want the first button to take the full width of the keyboard and the second and fourth button takes the middle then I want the last button to take the entire width at the bottom.
This is my code.
$replyMarkup = array(
'keyboard' => array(
array("Get all foods", "Menu" "List", "Cancel")
),
'resize_keyboard' => true
);
// checking if this user has already login in before
$useit = json_encode($replyMarkup);
$parameters = array(
"chat_id" => $user_id,
"parseMode" => "html",
"text" => "Select country code",
"reply_markup" => $useit
);
send("sendMessage", $parameters);
How can I resize each of my buttons using 'resize_keyboard' => true
2
Answers
you can make your keyboard structure with arrays
for example:
If you send it via "
sendMessage
?" then injson
it should look like this:Boolean in resize_keyboard MUSTN’t be in braces.