I'd like to use the methode editMessageReplyMarkup to get rid of my inline_keyboard buttons. I can get rid of them by passing the 'reply_markup' a json encoded keyboard like that:
$k = ['inline_keyboard' =>
[
[ ]
]
];
but as a result I get that error
Request has failed with error 400: Bad Request: object expected as reply markup
I tried a couple variants include not sending a 'reply_markup' at all as attribute to the methode, but I get the error "Bad Request: object expected as reply markup" or "Bad Request: can't parse inline keyboard button: InlineKeyboardButton must be an Object".
That is how I call the methode:
$bot->apiRequestJson("editMessageReplyMarkup", array(
'chat_id'=>$cb_chat_id,
'message_id'=>$cb_msg_id,
'reply_markup' => json_encode($k)
));
The function is taken from here: function taken from hellobot example https://core.telegram.org/bots/samples/hellobot
And to prove my function is working, that results in a new inline keyboard without any error
$k = ['inline_keyboard' => [
[
['text' => 'caption', 'callback_data' => 'test']
]
]];
Thanks for your help!
Markus