R
R
Ruslan Saifullin2016-06-15 09:12:44
JavaScript
Ruslan Saifullin, 2016-06-15 09:12:44

Why is a widget liked which was not liked?

There is a landing page - bare html, css, js.
Voting takes place on the page with the help of likes from social networks, there is a widget from the contact and facebook.
We noticed the strange behavior of the VK widget.
Sometimes, more often on mobile devices, the like is credited to the widget that was clicked on and the last widget in the list.
File structure:
1. There are several vk widgets on one page.
2. Installed as follows (each inside a separate container):

<div>
<div id="vk_like3"></div>
<script type="text/javascript">
VK.Widgets.Like("vk_like3", {pageTitle: 'Конкурс ....', pageDescription: 'Мой голос за группу №3', type: "button"}, 31);
</script>
</div>
<div>
<div id="vk_like4"></div>
<script type="text/javascript">
VK.Widgets.Like("vk_like4", {pageTitle: 'Конкурс ....', pageDescription: 'Мой голос за группу №4', type: "button"}, 32);
</script>
</div>

etc.
3. in <head>connectedvk api:
<script type="text/javascript" src="//vk.com/js/api/openapi.js?121"></script>

<script type="text/javascript">
  VK.init({apiId: 111111111, onlyWidgets: true});
</script>

--------------------------------------
upd: Found
out what the behavior is happens when you click "Tell Friends". Those. repost and like are counted to two widgets: for the one that liked and the last one

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question