我用电报API嵌入机器人的一个问题...QUERY_ID_INVALID - 电报直列机器人
我的代码:
$json = file_get_contents("php://input");
$dados = json_decode($json,true);
$id_query = $dados['inline_query']['id'];
$resultados_inline[] = [
'type' => 'article',
'id' => "1",
'title' => "Test",
'message_text' => "test",
];
$post[] = [
'inline_query_id' => $id_query,
'results' => serialize($resultados_inline),
];
$context_options = array(
'http' => array(
'method' => 'POST',
'header'=> "Content-type: application/x-www-form-urlencoded\r\n"
. "Content-Length: " . strlen($post) . "\r\n",
'content' => $post
)
);
file_get_contents("https://api.telegram.org/bot" . $api_telegram . "/answerInlineQuery",NULL,$context);
但我得到:
{ “OK”: false,“error_code”:400,“description”:“BadRequest:QUERY_ID_INVALID”}
有人可以帮我吗?
谢谢
谢谢,但你知道这个的原因?我可以修复什么?这很奇怪... –