I
I
ilya_compman2010-11-29 02:05:29
PHP
ilya_compman, 2010-11-29 02:05:29

Vkontakte API server-server

As you know, Vkontakte has several ways to work with the API:

  • via JS from a third-party site or from a built-in application
  • in ActionScript for Applications
  • and desktop applications
In order to organize work with the service at a time when the user is not on the site, I did not find a way, in other words, there is no way to make requests to the server-server API (with the exception of a few specific functions).

At one point, it seemed that it was possible to disguise the server as a desktop application, but even there a fly in the ointment, after going to the Vkontakte website for authorization, it is not able to transfer any data to our server.

So, question. Is it possible to somehow organize interaction with the VKontakte API in server-server mode?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DeNnEr, 2010-11-29
@DeNnEr

If you need to influence the user from the application, then you can use the set of functions:
vkontakte.ru/developers.php?o=-1&p=%D0%9E%D0%BF%D0%B8%D1%81%D0%B0%D0% BD%D0%B8%D0%B5+%D0%BC%D0%B5%D1%82%D0%BE%D0%B4%D0%BE%D0%B2+API
Specific - Methods that require a third-party server.
The rest of the VKontakte API policy does not allow.
A little hint: all the information that you need to use in processing can and should be collected / updated at the time of user authorization through your application.

A
AvrGavr, 2013-05-21
@AvrGavr

If php is used on the server, you can use the OAuth class , it is already built into php for server-server interaction.
In general, this is done using the curl technology.
This is how getting the language is done, for example:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.vk.com/method/audio.get?uid='.$uid.'&access_token='.$access_token);
curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);       
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$data = curl_exec($ch);
curl_close($ch);

Urls for which you need to request what you want can be found in the documentation in Vkontakte .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question