Answer the question
In order to leave comments, you need to log in
How to check that the user is in the VK group after clicking on Like?
There is a condition for receiving a discount: "must be in a group and like or share with friends"
How to add a check for other conditions to the "Like" widget?
For example, so that after a like on the VK.Observer website, check if the user is in the group?
<script type="text/javascript" src="//vk.com/js/api/openapi.js?84"></script>
<script type="text/javascript">
VK.init({apiId: XXXXXX});
</script>
<div id="vk_like"></div>
<script type="text/javascript">
VK.Widgets.Like("vk_like", {type: "button"});
VK.Observer.subscribe("widgets.like.liked", function f()
{
alert ("Thank you for your like.");
});
</script>
Answer the question
In order to leave comments, you need to log in
I guess the best scheme would be something like this:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question