Package not compatible with vk API version 3.
I had the following problem with mrt:accounts-vk. When I called Meteor.loginWithVk i received next error:
Typeerror: cannot read property '0' of undefined.
This propblem associated with VK api version in getIdentity(accessToken) request.
Steps for solve problem:
In your meteor project create directory for local packages
Rename package in this file: /packages/meteor-accounts-vk/package.js
for example:
Package.describe({
summary: "Login service for VKontakte accounts (https://vk.com)",
version: "0.2.0",
git: "https://github.com/alexpods/meteor-accounts-vk",
name: "mrt:accounts-vk2" // FIX NAME THERE
});
Install your local package locally. meteor add mrt:accounts-vk2 for prev example
Fix VK API version in getIdentity (/packages/meteor-accounts-vk/lib/vk_server.js)
Fixed example:
...
var getIdentity = function (accessToken) {
var result = HTTP.get(
"https://api.vk.com/method/users.get", {params: {
v: '3', // API VERSION
access_token: accessToken,
fields: 'uid, nickname, first_name, last_name, sex, bdate, timezone, photo, photo_big, city, country'
}});
...
Package not compatible with vk API version 3. I had the following problem with mrt:accounts-vk. When I called Meteor.loginWithVk i received next error:
Typeerror: cannot read property '0' of undefined
.This propblem associated with VK api version in
getIdentity(accessToken)
request. Steps for solve problem:meteor add mrt:accounts-vk2
for prev examplethis is work for me.