错误的发送电报机器人的标题作为HTML格式的PHP

问题描述 投票:0回答:1

我在使用时出错了

parse_mode = HTML

sendMessage工作当前在sendPhoto机器人有错误显示HTML格式链接。

sendMessage

<?php

$txt1="<a href='yahoo.com'>yahoo website</a>";
 $url= "https://api.telegram.org/bot".$token."/sendMessage?parse_mode=HTML&chat_id=".$chat_id."&text=".urlencode($txt1);
    file_get_contents($url);


?>

它的确适用,但在sendPhoto

<?php



  $url= "https://api.telegram.org/bot".$token."/sendphoto?parse_mode=HTML&chat_id=".$chat_id."&photo=".$photo."&caption=".urlencode($txt1);
    file_get_contents($url);



?>

它只显示文本作为标题没有任何链接。我的代码有什么问题?请帮我。谢谢

php bots telegram telegram-bot
1个回答
0
投票

奇怪的是,我可以在this payload看到蓝色文字链接。

顺便说一句,你可以试试inline keyboard link,它比HTML标记更酷:P

© www.soinside.com 2019 - 2024. All rights reserved.