D
D
denis952018-05-17 16:52:28
In contact with
denis95, 2018-05-17 16:52:28

Send a message to several friends VK?

Guys, I can’t figure out how to send a message to three friends at once through VK api
, there are two such requests.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>vk api </title>
</head>

<body>
    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
    <script>
        

       
            $.ajax({
                url: "https://api.vk.com/method/messages.send?user_id=480944884&message=привед&access_token=хххххх&v=5.68",
                method: 'GET',
                dataType: 'JSONP',
                success: function(data){
        alert(data);
        }

            });
        

            $.ajax({
                url: "https://api.vk.com/method/friends.search?count=3&access_token=хххххх&v=5.68",
                method: 'GET',
                dataType: 'JSONP',
                success: function(){
        console.log(id);
        }

            });
        
    </script>
</body>

</html>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur, 2018-05-22
Saifulmulukov @TiersWar

Alternatively, in a loop through messages.send with different recipient IDs.
https://vk.com/dev/messages.send

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question