NAME
VKontakte::Standalone - Perl extension for creating standalone Vkontakte API applications
SYNOPSIS
use VKontakte::Standalone;
my $vk = new VKontakte::Standalone:: "12345678";
my $auth_uri = $vk->auth_uri("wall,messages");
# make the user able to enter login and password at this URI
$vk->redirected($where);
$vk->api("activity.set",{text => "playing with VK API"});
DESCRIPTION
This module is just a wrapper for some JSON parsing and WWW::Mechanize magic, not much else.
CONSTRUCTOR METHODS
- $vk = VKontakte::Standalone::->new($api_id);
-
This creates the main object, sets the API ID variable (which can be got from the application management page) and creates the WWW::Mechanize object.
ATTRIBUTES
- $vk->auth_uri($scope)
-
This method should be called first. It returns the URI of the login page to show to the user (developer should call a browser somehow, see https://vk.com/developers.php?oid=-17680044&p=Authorizing_Client_Applications for more info).
- $vk->redirected($uri)
-
This method should be called after a successful authorisation with the URI user was redirected to. Then the expiration time and the access token are retreived from this URI and stored in the $vk object.
- $vk->api($method,{parameter => "value", parameter => "value" ...})
-
This method calls the API methods on the server, as described on https://vk.com/developers.php?oid=-17680044&p=Making_Requests_to_API. Resulting JSON is parsed and returned as a hash reference.
- $vk->captcha_handler($sub)
-
Sets the sub to call when CAPTCHA needs to be entered.
BUGS
Probably many. This is beta version.
SEE ALSO
https://vk.com/developers.php for the list of methods and how to use them.
AUTHOR
Krylov Ivan, <krylov.r00t@gmail.com>
COPYRIGHT AND LICENSE
Copyright (C) 2012 by Krylov Ivan
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.