I am trying to get access to a varible named has_photo
inside function inside Vk.api.call
but to no avail.
I have tried multiple things to make it work, like adding a return function or adding name to the function and then calling it.
My goal is to repeat the API call until user has a photo.
VK.Api.call('users.get', {
user_ids: 99,
fields: "has_photo",
v: "5.73"
}, function (r) {
has_photo = r.response[0].has_photo;
return has_photo;
}
);