-2

我正在使用电报机器人发送一些带有外部链接的文本作为按钮。我尝试过使用以下代码机器人,但我不知道要发送的 Json 值。拜托,有人可以帮助我吗?

$sendMsg = file_get_contents($boturl."/sendmessage?chat_id=".$chat_id."&text=".$c."&parse_mode=HTML&reply_markup=json_encode("?????")"); 

请帮我

4

1 回答 1

0

尝试这个

file_get_contents($boturl.'/sendmessage?chat_id='.$chat_id.'&text='.$c.'&reply_markup={"inline_keyboard":[[{"text":"Press here to open URL","url":"https://example.com"}]]}');
于 2017-04-13T16:28:51.990 回答