shakibonline / telegram-keyboards-helper
用于Telegram键盘Bot API的简单库
dev-master
2017-05-24 06:56 UTC
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2024-09-29 02:54:54 UTC
README
简单创建Telegram内嵌/回复键盘。
安装
composer require shakibonline/telegram-keyboards-helper
使用方法
您可以在example.php
文件中找到测试代码。
require_once 'vendor/autoload.php'; $button = new \Shakibonline\InlineKeyboardButton(); $button->text = 'shakibonline'; $button->callback_data = 'Test'; $inlineKeyboardMarkup = \Shakibonline\InlineKeyboardMarkup::create($button); $option = [ 'chat_id' => 122, 'text' => 'blablabla', 'reply_markup' => json_encode($inlineKeyboardMarkup) ];