Answer the question
In order to leave comments, you need to log in
Asynchronous initialization of Vkontakte api and VK.Auth.getLoginStatus() function?
Hello!
There was such a question.
Let's say I'm doing asynchronous initialization of the VK application by inserting the code at the beginning of the body tag:
window.vkAsyncInit = function() {
VK.init({
apiId: 5105632
});
};
setTimeout(function() {
var el = document.createElement("script");
el.type = "text/javascript";
el.src = "//vk.com/js/api/openapi.js";
el.async = true;
document.getElementById("vk_api_transport").appendChild(el);
}, 0);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question