
Probably, some of you have already read (for example,
here ) about a certain miracle script that allows you to “count” your VKontakte communication. Not very little time has passed since then, and we (
ortemij and I) managed to release a new, fourth, version. Under the cut, I will tell you a little about my impressions of working with vkontakte api and just a little bit popyarus.
Vkontakte API
I repent, we initially did not use the API, but just peeked at the source of the section with personal messages, how ajax-loading of new pages takes place there, and made them in the image and likeness. I will not go into the details of the implementation, since this is not a javascript blog, but I will just list the disadvantages of this approach:
- Serious restrictions: no more than 20 messages per second;
- If the user is in correspondence at this time, then restrictions will be imposed on this;
- Some users on VKontakte have consistently issued malformed responses to ajax requests , starting with a specific message;
- The impression was that the control over the number of calls per second was hard to do;
- Dependence on the language set by the user: to find the date in the answer, you need to know a certain line, its own for each language;
- The inability to read the entire message, for example, to calculate statistics on the size of the message;
- So, generally speaking, you can not do: the rules are written. But we found out about it too late :)
Because we switched to the API. Honestly, I rather liked him than not. Here are its advantages:
- Low threshold of entry. It took me about fifteen minutes to figure out what was happening. It's really nice to work with an intuitive API.
- Rich features. Most of the features that users ask for (or we want to implement ourselves) are realizable using the API, be it “I want messages only in the last 9000 seconds”, “only from friends” or “I want (not) to take into account the full text of messages”
But, of course, there are also disadvantages, mainly in organizational aspects:
- Illogical restrictions on calling different methods for different types of applications
- There are no restrictions on the number of calls to any methods per second. It is necessary to determine empirically. As I understand it, any method cannot be called more often than once per second. This, from my point of view, is stupid, since requests “to receive 100 messages in all” and “to receive names and surnames on the following id” load the server in completely different ways.
As advertising
Actually, what our wonder script can do:
- Accounting for the number of incoming and outgoing messages
- (optional) Accounting for the size of incoming and outgoing messages
- (optional) Considering only those messages that were written by people who were at that moment (!) in friends
- Export to note
- Processing up to 100 messages per second
Our nearest plans:
- Ability to ignore chat messages
- Ability to build a beautiful graph of the total number (or size) of messages from time
- The ability to build a cloud of frequently used words (both for all people and separately for each)
Some statistics about statistics
We still don a little bit of the wild growth in the popularity of our script, and don’t really know what to do with it:

View the rest of the statistics
here .
')
Our contacts
Official group:
vkontakte-statsProject on google code:
vkontakte-statsMailbox:
vkontakte.stats@gmail.comSkype:
vkontakte.statsWe wish everyone a variety of benefits! We are waiting for your cool ideas, malicious criticism and a lot of jokes!