V
V
voltd gand2019-03-21 13:35:23
API
voltd gand, 2019-03-21 13:35:23

Why (Callback API) the response from the bot comes several times in the conversation?

I return "ok" to the server, apart from "ok" I don't touch anything, in terms of output, etc.
Small piece of code:

$request_params = array( 
'message' => "Hello, {$user_name}!", 
'user_id' => $user_id, 
'access_token' => $token, 
'v' => '5.0' 
); 

$get_params = http_build_query($request_params); 

file_get_contents('https://api.vk.com/method/messages.send?'. $get_params); 

echo('ok'); 
break; 
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
randazzo, 2019-03-23
@vladimir_volohov

5c955e687d338201035284.png

V
Valentin, 2019-03-21
@romanko_vn

after break; goes "}" is it a loop or a condition?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question