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

Member
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)
 

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
 

DonManfred

Expert
Licensed 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:

DonManfred

Expert
Licensed User
I still do not understand. Describe it clearly (in WORDS)

Doesn´t the sendpicture with a text look like this?

Edit to add: The gray "Pagar with a $ sum"... Looks like this is an Inlinekeyboard-button.
 

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
 

DonManfred

Expert
Licensed 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.
 

DonManfred

Expert
Licensed 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)
 
Top