I have telegram-bot code on php, and reply messages sending by replyWithMessage
method.
All command here:
$this->replyWithMessage(['text' => $item['title']. "\n\n" . $url]);
How can i add some preview image before text?
I have telegram-bot code on php, and reply messages sending by replyWithMessage
method.
All command here:
$this->replyWithMessage(['text' => $item['title']. "\n\n" . $url]);
How can i add some preview image before text?
You can use
/sendphoto
and set thecaption
which appears under an image.https://core.telegram.org/bots/api#sendphoto
You can do it using markdown too:
No, You CAN send a text that contains photo in one single message. Telegram allows you do this but that the way is kinda tricky.
disable_web_page_preview
=>false
text
data put an image link with invisible character(s) inside your message text.Example:
You can't send a text message that contains both image and text. However If your text contains URL, Telegram displays a preview of the web page by default. Or you can send two message one after another or send a photo with caption.