понеділок, 16 січня 2012 р.

How much time you wasted in vkontakte.ru

Social network vk.com has beautiful api for different types of applications such as iframe, standalone and flash applications. Here you can find pretty documentation for it. But almost each method requires user authentication in vk.com, except several methods.

Here I came across with getProfiles() method. So let's describe one and create simple application for information acquisition via this method.

First of all we should look at getProfiles() method and build correct request to vk.com server.So there are several ways to send request to vkontakte api, but in this post we use api for standalone applications.

Thus we should send request to https://api.vkontakte.ru/ with ruquied parametrs.

In my opinion the most interesting method in this api is method that doesn't require user authentification. Everyoune can send such request to RESR api and obtaint basic information about persona. As for me I have an idea detect how much time ny friends spend (or waste) visiting vk.com.

Having read vk.com api doumantation I desided get unique itendifiers of my friends via friends.get method and then check if anyone is online among them via getProfiles(). The most interesting this that getProfiles does't reqiues user authentification, and in addition it requesres just one parametr - user id.

// here is genaral template for accessing vk.com api methods
https://api.vkontakte.ru/method/METHOD_NAME?PARAMETERS&access_token=ACCESS_TOKEN


Немає коментарів:

Дописати коментар