Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
807 stars 341 forks source link

gif inlineBot problem #157

Closed Mohsen322 closed 3 years ago

Mohsen322 commented 6 years ago

hi i have a problem with answerInlineQuery method when i prepare array for passing to method, it didnt work properly and DOCUMENT_INVALID error returned to the telegramLog file

array will work fine with just one file_id, and i have no idea why!

$results = array(
    array(
            "type" => "mpeg4_gif",
        "id" => "7",
        "mpeg4_file_id" => "CgADBAADRCgAArBJwyMp98tuCXl5AwI"
        )
);

$results = json_encode($results);

$content = array('inline_query_id' => $inline_query_id, "results" => $results);
$telegram->answerInlineQuery($content); 

above code work and show one gif as a result, but when i add more array in results array got a DOCUMENT_INVALID

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.