Hi guys, why doesn't this give multiple images when I

use a bot command? There must be something I forget, because it shows one photo when I use one url, but doesn't show 4 photos when I use 4 urls. Does anybody know? It's php.

$media = [];
$media[] = ['type'=>'photo', 'media' => 'https://www.example.com/image.png'];
$media[] = ['type'=>'photo', 'media' => 'https://www.example.com/image2.png'];
$media[] = ['type'=>'photo', 'media' => 'https://www.example.com/image3.png'];
$media[] = ['type'=>'photo', 'media' => 'https://www.example.com/image4.png'];

$content = ['chat_id' => $chat_id, 'media' => json_encode($media)];
$telegram->sendMediaGroup($content);

1 ответов

8 просмотров

Looks fine to me, what do you mean by doesn't show 4 photos? Do you get any error?

Похожие вопросы

Карта сайта