php - 在带有图像的 Telegram Bot 中发送消息

标签 php telegram telegram-bot

我在 php 上有 Telegram Bot 代码,并通过 replyWithMessage 方法发送回复消息。

这里的所有命令:

 $this->replyWithMessage(['text' => $item['title']. "\n\n" . $url]);

如何在文本前添加一些预览图像?

最佳答案

您可以使用 /sendphoto 并设置显示在图像下方的 caption
https://core.telegram.org/bots/api#sendphoto

关于php - 在带有图像的 Telegram Bot 中发送消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37860889/

相关文章:

php - 调用未定义的方法 Closure::getName()

php - Soundcloud 401错误/无效的PHP封装授予

java - 我在使用 Telegram Bot API webhook 支持和通过 bouncycaSTLe 生成的自签名证书时遇到问题

bots - 用户加入 channel 时的 Telegram Bot 事件

Telegram,获取现有贴纸的 file_id

python-3.x - 如何处理 python 电报 bot 中的回调查询

php - 比较彩色字符串 PHP

javascript - 在 PHP、JAVASCRIPT 上使用 AJAX 检查数据库中的变量,如果为真,则为某个页面的标题

python - 如何将python输出发送到 Telegram channel 而不是组和gmail电子邮件组

python - 我正在用 python 写一个 Telegram Bot