An alternative library for interacting with vk.com with solid and exceptionally convenient API.
The driver is packaged as an UMD and is published to:
npm install --save @vk-x/vk-api
bower install vk-api
https://cdn.jsdelivr.net/vk-api/latest/vk-api.min.js
https://cdn.jsdelivr.net/vk-api/latest/vk-api-no-shortcuts.min.js
After you've included and loaded the script, you can use it either with Promises or with callbacks.
// Authenticate on your website.
vk.authWebsite("app-id", ["permissions"]).then(function() {
vk.users.get()
}).then(function(currentUser) {
// https://vk.com/dev/users.get
})
// Alternatively, obtain the access token yourself.
vk.accessToken = "obtained-access-token"
vk.users.get().then(function(currentUser) {
// https://vk.com/dev/users.get
})
vk.method()
support with callbacksvk.users.get()
instead of vk.method("users.get")
vk.getAuthUrl()
and aliases for secure methods