我在使用时出错了
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);
?>
它只显示文本作为标题没有任何链接。我的代码有什么问题?请帮我。谢谢
奇怪的是,我可以在this payload看到蓝色文字链接。
顺便说一句,你可以试试inline keyboard link,它比HTML标记更酷:P