++ed by:
2 non-PAUSE users
Author image Marat Shaymardanov


VK - module to work with "VKontakte" social network (vk.com), it allows to make posts with images and links, create albumbs and upload images.


Simple usage:

        use VK;

        my $vk = VK->new('vkaccount@email.com', 'mypassword', undef, 1234);
        print $vk->wallPost(
            message         => "Hello World!",
           link            => "http://code.google.com/p/vkontakte-non-api-manager",
           photo           => "sample.jpg"


Detailed sample with comments:

        use VK;

        my $security_code = 1234; # last 4 digits of your phone registered to account

        # login to post to our own wall
        my $vk = VK->new('vkaccount@email.com', 'mypassword', undef, $security_code);

        # next init sample is for group's wall posting
        # my $vk = VK->new('vkaccount@email.com', 'mypassword', "/mygroupaddress", $security_code);

        print $vk->wallPost(
                message         => "Hello World!", # post message
                #to_id           => 1234456, # userid/wallid where we are going to post, or void to post to own wall/group-wall

                link            => "http://code.google.com/p/vkontakte-non-api-manager",        # link
                link_title      => "This is the title of the link popup", # link popup description
                link_desc       => "This is the content of link popup", # link popup description

                signed          => '', # 1/0 - signs post if 
                note_title      => '',

                photo           => "sample.jpg",        
                album           => "This is the new album",
                album_desc      => "This is description of a new album",
                album_view      => 0, # 0-all, 1-friends, 2-friends&friends, 3-me
                album_comments  => 0,   # 0-all, 1-friends, 2-friends&friends, 3-me


Create album:

        $vk->createAlbum("Album name", "Album description");

Upload photo:

        $vk->addPhoto("photo.jpg", "Album name", "Album description", $view, $comments);

        $view # - means who can view album: 0-all, 1-friends, 2-friends&friends, 3-me

        $comments # - means who can view album: 0-all, 1-friends, 2-friends&friends, 3-me

Login to account:

        $vk->login('vkaccount@email.com', 'mypassword', $walluri, $security_code);


Module was made using WWW::Mechanize::GZip,

so if you are going to make any modifications next modules will be useful:



Marat Shaymardanov, email: info@leonmedia.ru


Copyright (C) 2012-2013 by Marat Shaymardanov, LeonMedia LLC 2012-2013

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 207:

Unknown directive: =no

Around line 208:

Non-ASCII character seen before =encoding in 'class="err">В'. Assuming UTF-8