shakibonline/telegram-keyboards-helper

Simple library for telegram keyboards Bot API

dev-master 2017-05-24 06:56 UTC

This package is not auto-updated.

Last update: 2024-09-15 02:37:48 UTC


README

Simply create telegram Inline/Reply keyboards.

install

composer require shakibonline/telegram-keyboards-helper

Usage

You can find tested code in example.php file.

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)
];