Skip to content

Please help! How use sendMediaGroup method? #1453

Answered by Hitmare
KornetWeb asked this question in Q&A
Discussion options

You must be logged in to vote

Its quite easy to be honest

//create a array with every image according to the API https://core.telegram.org/bots/api#inputmediaphoto


$mediaarray[0] = [
    'type' => 'photo',
    'media' => 'https://picsum.photos/200',
];
$mediaarray[1] = [
    'type' => 'photo',
    'media' => 'https://fastly.picsum.photos/id/15/200/200.jpg?hmac=8F3A7g2kO57xRlUcdio-9o4LDz0oEFZrYMldJkHMpVo',
];
$mediaarray[2] = [
    'type' => 'photo',
    'media' => 'https://fastly.picsum.photos/id/433/200/200.jpg?hmac=dBn6DDBngOA94Grm3jfIJNDtv08GorUvB0zMeAw0Jfs',

];
//create the array with the needed data for sendMediaGroup according to the API https://core.telegram.org/bots/api#sendmediagroup
$data = [
        'cha…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by noplanman
Comment options

You must be logged in to vote
2 replies
@TiiFuchs
Comment options

@Sobex007
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants