The preferred way to install this extension is through composer.
Either run
php composer.phar require mirkhamidov/simple-bot-telegram "*"
or add
"mirkhamidov/simple-bot-telegram": "*"
to the require section of your composer.json
file.
Once the extension is installed, simply use it in your code by :
<?php
$tg = new TelegramBot($tokenForBot);
$tg->sendMessage('Message with inline keyboard', $chatId, [
'reply_markup' => json_encode([
'inline_keyboard'=>[
[
['text'=>"refresh",'callback_data'=> time()]
]
]
]);
?>
PS: Inspired by aki/yii2-bot-telegram