我正在尝试获取已转发消息的用户的 ID。就像从 X 转发的消息一样,我需要获取 X id
我试过这个,但我没有收到任何关于 forward_from 的信息
<?php
$update = file_get_contents('php://input');
$update = json_decode($update, TRUE);
$message = isset($update['message']) ? $update['message'] : "";
$reply = isset($message['reply_to_message']) ? $message['reply_to_message'] : "";
$reply_id_username = isset($reply['forward_from']['id']) ? $reply['forward_from']['id'] : "";
$reply 结果是
{
"message_id": 3,
"from": {
"id": BOT ID,
"is_bot": true,
"first_name": "X",
"username": "X_Bot"
},
"chat": {
"id": MY ID,
"first_name": "Me",
"username": "Me",
"type": "private"
},
"date": 1590679285,
"forward_sender_name": "User X",
"forward_date": 1590679285,
"text": "Text"
}
它只给我他的名字
泛舟湖上清波郎朗