Answer the question
In order to leave comments, you need to log in
What am I doing wrong when inserting a button from VK?
The task is simple, but it takes too much time.
So I put in this button.
<script type="text/javascript" src="//vk.com/js/api/openapi.js?121"></script>
<script type="text/javascript">
VK.init({apiId: 3863218, onlyWidgets: true});
</script>
</head>
<body>
<script type="text/javascript">
VK.init({apiId: 3863218, onlyWidgets: true});
</script>
<!-- Put this div tag to the place, where the Like block will be -->
<div id="vk_like"></div>
<script type="text/javascript">
VK.Widgets.Like("vk_like", {type: "full", verb: 1});
</script>
<script type="text/javascript" src="//vk.com/js/api/openapi.js?121"></script>
<script type="text/javascript">
VK.init({apiId: 3863218, onlyWidgets: true});
</script>
</head>
<body>
<!-- Put this div tag to the place, where the Like block will be -->
<div id="vk_like"></div>
<script type="text/javascript">
VK.Widgets.Like("vk_like", {type: "full", verb: 1});
</script>
Answer the question
In order to leave comments, you need to log in
In my opinion, this part should be inserted into<head></head>
<script type="text/javascript" src="//vk.com/js/api/openapi.js?121"></script>
<script type="text/javascript">
VK.init({apiId: 3863218, onlyWidgets: true});
</script>
</head>
<body>
<script type="text/javascript">
VK.init({apiId: 3863218, onlyWidgets: true});
</script>
Everything is written there. "Invalid application domain.".
Most likely, you did not enter the domain when you received the key, or entered it with an error, or entered it and did not save it.
There are a lot of options, dig the section for developers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question