K
K
Knyaz-intell2018-10-02 11:50:03
In contact with
Knyaz-intell, 2018-10-02 11:50:03

VK javascript sdk and VK mobile sdk what to use in the mobile version of the iframe application?

Hello. There is an iframe application used by vk javascript sdk. Everything works on the full version of the site. Namely this code.

window.VK.init(function() {
    console.log('yes')
}, function() {
    console.log('fail')
}, '5.84');

and then elsewhere
window.VK.api("wall.post", {"message": message, "owner_id": group_id, "v":"5.84"}, (data) => {
                console.log(data);
            });

In the mobile version of VK.api, an object with an error arrives in the data object:
error:{error_code: 214, error_msg: "Access to adding post denied"}
What could be the reason. Maybe you need to use the mobile sdk for the mobile version?
I already tried, but I understand that this library is not for the browser, because. in the code there is a check for whether window.androidBridge or window.webkit objects exist. As I understand it, they appear when you include some kind of wrapper for executing javascript in native applications. Then why is it written in the mobile sdk dock: to use the Mobile SDK, add the script connection to the pages:
<script src="https://vk.com/js/api/mobile_sdk.js"  type="text/javascript"></script>
? Or there you can use html in addition to javascript. Sorry, I've never dealt with mobile development, I don't know.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Knyaz-intell, 2018-10-18
@Knyaz-intell

Nobody has any ideas?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question