Closed honarkar98 closed 4 years ago
add this code to Telegram.php:
public function sendMediaGroup(array $content)
{
return $this->endpoint('sendmediagroup', $content);
}
and use like this code:
$media = array (
array('type' => 'photo', 'media' => 'PIC_URL1', 'caption' => 'pic 1'),
array('type' => 'photo', 'media' => 'PIC_URL2', 'caption' => 'pic 2'),
array('type' => 'photo', 'media' => 'PIC_URL3', 'caption' => 'pic 3')
);
$content = array('chat_id' => $chat_id, 'media' => json_encode($media));
$telegram->sendMediaGroup($content);
first check the documentation https://core.telegram.org/bots/api#sendmediagroup
persian tutorial: https://virgool.io/@mohsen322/how-to-send-pictures-as-a-album-via-telegram-bot-x3z46dtsvxeh
sample: