Send a long message from photo to telegram with php bot

I need to send a long text with a photograph to the telegram, but the signature in the telegram has 200 characters. How to send long text with photo using php and bot? The sendPhoto method has 200 characters. I see the bot's telegram sending a long text and photo to my photo.

this is a sample image send to telegrem

+7
source share
4 answers

You can use a blank character!

Just set parse_modeField to HTMLin the sendMessagemethod, then in the Field textfield insert the image URL in href

The hyperlink will not be visible when using an empty character:

<a href="https://www.nafasbekesh.ir/wp-content/uploads/2016/10/img1.jpg"></a>

.

+9

parse_mode Markdown HTML. . https://core.telegram.org/bots/api#markdown-style

Some words [/start](https://www.google.ru/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png)
ok.
You will see google logo in the bottom of message. The blue line on the left of the image indicates that it is the parsing contents of the link
+6

Markdown Style HTML URL-.

URL-:

[inline URL](http://www.example.com/)

( ALT + NUMPAD) .

[ALT + 255] , .

[ ](http://www.example.com/)

, .

+4

You can use (ALT + NUMPAD characters) to hide the link text.

For example, [ALT + 255] create an inextricable space that you can use.

but in this case I got the following error

PHP warning :: Could not open stream: HTTP request failed! HTTP / 1.1 400 Bad Request

0
source

Source: https://habr.com/ru/post/1655048/


All Articles