-
I dont understand what are the parameters set to metod sendMediaGroup? Everybody can help me with example? |
Beta Was this translation helpful? Give feedback.
Answered by
Hitmare
Mar 19, 2024
Replies: 2 comments 2 replies
-
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 = [
'chat_id' => $chat_id,
'media' => $mediaarray,
];
//send the MediaGroup
return Request::sendMediaGroup($data);
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
noplanman
-
how can i send text with the media group to be as default for them? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Its quite easy to be honest