将图像链接发送到没有显示图像URL的电报 [英] Send an image link to telegram without display image url

查看:170
本文介绍了将图像链接发送到没有显示图像URL的电报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要发送图片网址到电报,没有显示图片网址和隐藏网址。我看到一个电报机器人,它做得很好并发送带有图像的长信息我附加这个机器人结果图像看到它。
现在怎么能在我的自定义机器人中做到这一点?这可能是MARKDOWN风格或任何方式隐藏的URL?我希望在我的文本中隐藏图像网址,但电报显示我的图像。看我的示例附加图像。
谢谢

I need send an image url to telegram without display image url and hidden url. I see a telegram bot and it's do it very well and send long message with image I'm attach this bot result image see it. Now how can do it in my custom bot? It's possible hidden url with MARKDOWN style or any way? I want hidden image url in my text but telegram display my image. see my sample attach image. thank you

推荐答案

他们中的大多数人都使用点(或者像这个字符这样的东西)进行链接描述,你认为没有链接。

Most of them use the dot (or some things like this character) for link description and you thought there is no link.

你可以输入以下行并选择自定义降价

You can type the following line and select custom markdown:

@bold [.](http://www.planwallpaper.com/static/images/i-should-buy-a-boat.jpg)

如果要在链接中添加文本,则需要创建机器人并在机器人中使用此方法。

If you want to add text to your link, you need to create a bot and use this approach in the bot.

编辑:

使用bot api发送超链接,您只需发送html标记并使用 parse_mode 。请参阅电报文件

For sending hyperlink with the bot api you can simply send html markup and using parse_mode. See telegram documents:


要使用此模式,请在使用sendMessage时在parse_mode字段中传递HTML。目前支持以下代码:

To use this mode, pass HTML in the parse_mode field when using sendMessage. The following tags are currently supported:



<b>bold</b>, <strong>bold</strong>
<i>italic</i>, <em>italic</em>
<a href="http://www.example.com/">inline URL</a>
<a href="tg://user?id=123456789">inline mention of a user</a>
<code>inline fixed-width code</code>
<pre>pre-formatted fixed-width code block</pre>

样本:

<a href="http://www.planwallpaper.com/static/images/i-should-buy-a-boat.jpg"></a>

这篇关于将图像链接发送到没有显示图像URL的电报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆