Answer the question
In order to leave comments, you need to log in
How to get data from dynamic widget OnAuth VKontakte?
<script type="text/javascript" src="https://vk.com/js/api/openapi.js?161"></script>
<script type="text/javascript">
VK.init({apiId: #####});
</script>
<!-- VK Widget -->
<div id="vk_auth"></div>
<script type="text/javascript">
VK.Widgets.Auth("vk_auth", {"onAuth":"function(data) {alert(\'user \'+data[\'uid\']+\' authorized\');}"});
</script>
Answer the question
In order to leave comments, you need to log in
try without quotes
VK.Widgets.Auth("vk_auth", {"onAuth":function(data) {alert('user '+data['uid']+' authorized')}});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question