Categories
PHP

Telegram bot : SendPhoto method doesn’t work

I have a bot and this bot send some message to my channel with a cronjob. these messages are kind of photo, simple text, video, gif(document) and voice.
some time’s I try to send photos with below code:

            $this->api->apiRequest(
                'sendPhoto',
                array(
                    'chat_id' => $this->chatid,
                    'photo' => $this->msg_data['file_id'],
                    'caption' => $this->msg_text,
                    'reply_to_message_id' => $this->message_id,
                    'reply_markup' => $reply_markup,
                )
            );

What is the problem? Why does not send some photos?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s