PHP code example of elwahab / telegram
1. Go to this page and download the library: Download elwahab/telegram library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
elwahab / telegram example snippets
use ELWAHAB\Telegram;
$telegram = new Telegram(BOT_TOKEN);
$telegram->sendMessage(CHAT_ID, 'Message');
$telegram = new Telegram(BOT_TOKEN);
$params = [
'callback_query_id' => $callback_id, // id callback for answer
'text' => $answer // text answer
];
$telegram->answerCallbackQuery($params);