A
A
Andrew Kovacz2016-11-18 17:01:24
PHP
Andrew Kovacz, 2016-11-18 17:01:24

How to create a bot for Vkontakte?

Recently I came across a topic from Habr about creating your own "alter ego" in Vkontakte. Where the author suggests writing a script in PHP, which, of course, using the VK API, could respond to messages, and not only. I was very interested in this topic, but I can still say "green" in programming and practically unfamiliar with PHP, and I couldn’t revive my alter ego .. But, since I started this business, I would still like to finish , I started learning PHP and I managed to implement something, but the code written by the author of the topic did not want to work at all, not only did he not leave the library he used, he also made several syntax errors ..
Actually, someone could explain, help the whole thing implement?
Here is a link to the topic
PS If you write in more detail about the problem, then, if you take, the first two snippets of the author's code (before filling the database), everything works out for me, the script seems to run, there are no errors, But it does nothing, does not respond to messages I don't know what's wrong anymore?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Dart, 2016-11-18
@BlackEvilDragon

You need access to messages, so a special key for stanalone applications. Then you receive messages using the method from the documentation https://vk.com/dev/messages Offhand, can you answer which methods you have already used from those indicated?

K
Kirill Zhilyaev, 2016-11-19
@kirill_782

Check responses from api. I see fields there from version 3 of the API. And it will be turned off soon.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question