I’ve just changed your code like this!
function telegram_get_inline_keyboard_layout($template) {
//return (array)json_decode( $template );
return [[ [ ‘text’ => ‘Some button text 1’, ‘callback_data’ => ‘1’ ], [ ‘text’ => ‘Some button text 2’, ‘callback_data’ => ‘2’ ] ]];
}
and it worked for me! But when i used “return (array)json_decode( $template );”
with this sample:
“[[{“text”:”Text 1″,”callback_data”:”1″},{“text”:”Link 1″,”url”:”https://botpress.org”}],[{“text”:”Text2″,”callback_data”:”2″}]]”
nothing happened!