A
A
Andrey Frolov2017-03-08 21:54:32
PHP
Andrey Frolov, 2017-03-08 21:54:32

How to organize a notification of a new application on the landing page in a personal VK?

For there is not always time to check the mail, the VK message can be seen faster.
more interested in how to implement "from whom" ? I would not want to store the token on the server (although this is probably my paranoia). and if many people need to send a notification - do not sculpt a bunch of profiles for this

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Sokolov, 2017-03-08
@farpram

Options:
The messages.send() method sends a message from a user or community; secure.sendNotification() - notification from the application; secure.sendSMSNotification()  - SMS from the application. Probably better to make a message from the Community.
Create a new closed group for yourself, where only you will be. Enable community messages and get a key (just copy it from Community Settings - Working with API.
When an event occurs in the landing page, open the VKontakte API link with a script, for example, like this:

$url = "https://api.vk.com/method/messages.send";
$params = [
  'user_id' => 123456, // ваш user_id в ВК
  'message' => 'Новая заявка!',
  'access_token' => $TOKEN, // токен сообщества
  'v' => 5.62
];
$url = $url . '?' . http_build_query($params);
file_get_contents($url);

V
Vitaly, 2017-03-08
@vshvydky

Open the description of the VK api methods, make a post acceptance on the server, get from the landing page and inform yourself via the api .... it seems obvious.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question