Answer the question
In order to leave comments, you need to log in
VK API Asynchronous initialization?
The site has a comments widget from VK, I want to do asynchronous loading as indicated in the VK API
Show an example of how to run it correctly, I have nothing to do.
<div id="vk_api_transport"></div>
<script type="text/javascript">
window.vkAsyncInit = function() {
VK.init({
apiId: ВАШ_APP_ID
});
};
setTimeout(function() {
var el = document.createElement("script");
el.type = "text/javascript";
el.src = "https://vk.com/js/api/openapi.js?162";
el.async = true;
document.getElementById("vk_api_transport").appendChild(el);
}, 0);
</script>
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