Vkontakte open api and the problem with the rights?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
10 views
I can not figure out how to put the right application. Seems to be simple:


Plug-in header
<script src="http://vk.antizapret.ru/js/api/xd_connection.js?2" type="text/javascript"></script>
<script src="http://vkontakte.ru/js/api/openapi.js" type="text/javascript"></script>



Then write in the body
<script type="text/javascript">

VK.init({
apiId: my_id
});

VK.UI.button('login_button');

VK.callMethod('showInstallBox',0);
</script>




Authorization is proceeding normally, and all API via VK.api run normally, but as soon as I want to call showInstallBox error appears

TypeError: Result of expression 'options' [undefined] is not an object. vkontakte.ru/js/api/openapi.js:317



Also I tried to call the onClick, after the full page load, the same thing.


What am I doing wrong? Maybe something not connected? May not cause?

Thank you in advance.
by | 10 views

1 Answer

0 like 0 dislike
Similar problem.
Found that occurs because of a conflict xd_connection and openapi.
If xd_connection is loaded first, then the functions don't work openapi (widgets, etc.), if on the contrary, it does not work accordingly, the functional js api contact.
by

Related questions

0 like 0 dislike
2 answers
asked Mar 24, 2019 by zoommy
0 like 0 dislike
3 answers
0 like 0 dislike
2 answers
asked Mar 23, 2019 by homm
0 like 0 dislike
1 answer
asked Aug 12, 2019 by Kochan72
110,608 questions
257,186 answers
0 comments
27,979 users