Hey. Could you help me. I'm trying add inline button with URL to message. In client button dosn't show. Why ?
$keyboard = Keyboard::make()
->inline()
->row(
Keyboard::inlineButton(['text' => 'Test', 'url' => 'https://www.google.com'])
);
$response = Telegram::sendMessage([
'chat_id' => '-XXXXXXXX',
'text' => 'To ticket № '. $comment->ticket_id .' added comment',
'reply_markup' => $keyboard
]);
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
Hey. Could you help me. I'm trying add inline button with URL to message. In client button dosn't show. Why ?
$keyboard = Keyboard::make() ->inline() ->row( Keyboard::inlineButton(['text' => 'Test', 'url' => 'https://www.google.com']) ); $response = Telegram::sendMessage([ 'chat_id' => '-XXXXXXXX', 'text' => 'To ticket № '. $comment->ticket_id .' added comment', 'reply_markup' => $keyboard ]);
$url_arr[0]['text']='Text URL';
$url_arr[0]['url']='https://www.google.com';
$telegram_user = \Telegram::getWebhookUpdates()['message'];
$response = \Telegram::sendMessage([
'chat_id' => $telegram_user['from']['id'],
'text' => 'Test text:',
'parse_mode'=>'html',
'reply_markup'=>json_encode(['inline_keyboard'=>array($url_arr)])
]);
how get $url_arr[0]['callback_query'] value ?
@CORPARU Thanks! I attach an example with callback data I did based in your solution. Thanks!! :)
$url_arr[0]['text']='message to show';
$url_arr[0]['callback_data']='code_to_send';
$response = $telegram->sendMessage([
'chat_id' => $chatId,
'text' => $message,
'reply_markup' => json_encode(['inline_keyboard'=>array($url_arr)])
]);
Most helpful comment