V
V
voltd gand2019-07-24 15:37:04
PHP
voltd gand, 2019-07-24 15:37:04

Why is the poll (polls.addVote) not being sent?

$request_params = array( 
  'question' => "Как Вы думаете, реализоваать?", 
  'owner_id' => "554183655", 
  "add_answers" => $json,
  "background_id" => 1
  'access_token' => $token, 
  'v' => '5.80' 
    ); 
  $get_params = http_build_query($request_params); 
  $pap = json_decode(file_get_contents('https://api.vk.com/method/polls.create?'. $get_params)); 
    $papi = $pap->response->id;
        $requestparams = array( 
  'message' => "Было добавлено новое предложение от *id".$ids." в теме (https://vk.com/topic-184677846_39420989), пожалуйста, проголосуйте вопросе, чтобы понять, годно это или нет.<br><br><br>Идея: ".$mess, 
  'peer_id' => 2000000001, 
  'attachment' => "poll554183655_".$papi,
  'access_token' => $tokens, 
  'v' => '5.80' 
    ); 
  $getparams = http_build_query($requestparams); 
  file_get_contents('https://api.vk.com/method/messages.send?'. $getparams);

The survey is not sent, why I do not know, everything seems to be correct.
The survey ID is stored, the attachment itself is not sent.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
1
1210mk2, 2019-07-24
@vladimir_volohov

dump line by line, maybe your $papi is empty.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question