B4J Question image embedded to telegram

Yoldi

Member
Regards.
Is it possible to send a text message with an image embedded to telegram with the library jtelegrambot?

Thank you
 

behnam_tr

Active Member
Licensed User
Longtime User
you can send photo with sendphoto method and with caption text

B4X:
jtb2.sendPhoto(jtb2.byId(from.id),jtb2.MediaByFile(File.DirApp&"/user_reports",filename),"your text",True,Null,null)
 
Upvote 0

Yoldi

Member
Regards. Thanks for the reply. It is not what you are looking for. What he asks is if it is possible to wipe an image with a text as is done with the emoji. Thank you
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I dont understand the question. Can you be more precise what exactly you are expecting?
sendPhoto is the correct command to send a photo to a chat. And this is how i interpret your question from #1 (or the Threadtitle)
 
Last edited:
Upvote 0

Yoldi

Member
Regards.

What you want is to be able to reduce a text with an image plus text plus image etc.

Text + image + text + image .....

Thank you
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Text + image + text + image .....
i dont think this is possible. At least i don´t know how such message works.

You need to search google, stackoverflow or telegram documentation to find out how it works (sample code).
I then can help you rebuild it.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Text + image + text + image
You need to send two messages. Each have one image plus text.

It works using MARKDOWN. But only one image. At least i did not get it working with two or more images plus text.

B4X:
        jtb.sendMessage(jtb.byId(chat.Id),$"[](http://snapshots.basic4android.de/b4arulez.gif) B4X Rules!."$,"MARKDOWN",False,False,0,Null)

telegrammarkdown012.png
 
Upvote 0
Top