Open API is the system for developers of third-party sites, which enables them to authenticate users of vk.com on their websites.
First, add the submodule to your Git application:
git submodule add git://github.com/Slaver/vk.git modules/vk
git submodule update --init
Or clone the module separately:
cd modules
git clone git://github.com/Slaver/vk.git vk
cd modules/vk
git submodule update --init
Edit application/bootstrap.php
and add the module:
Kohana::modules(array(
...
'vk' => MODPATH.'vk',
...
));
Create new API at vk.com.
Get unique API ID, password and secret key and put it in config/vk.php
.
Create file xd_receiver.htm in the root directory of your site. VK authentication doesn't work without this file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Open API XD Receiver</title>
</head>
<body>
<script src="http://vkontakte.ru/js/api/xd_receiver.js" type="text/javascript"></script>
</body>
</html>
See classes/controller/vk.php