Answer the question
In order to leave comments, you need to log in
VK OpenAPI method VK.Api.call() Callback not called?
Hello, I have the following code
window.vkAsyncInit = function() {
VK.init({
apiId: 2396558,
nameTransportPath: '/xd_receiver.html',
vk: 1
});
VK.Auth.getLoginStatus(function authInfo(response) {
if (response.session) {
document.getElementsByTagName('body')[0].style.display = "block";
document.location.href = "#!/id" + response.session.mid;
VK.Api.call('getUserSettings', {}, function(user) {
// There should be called callback
});
} else {
VK.Auth.login(function(response) {
if (!response.session) {
alert('You have to allow app use your account');
}
}, VK.access.FRIENDS | VK.access.WIKI);
}
});
}
VK.Api._callbacks[6877234]({"error":{"error_code":4,"error_msg":"Incorrect signature: server authorization","request_params":[{"key":"api_id","value":"2396558"},{"key":"callback","value":"VK.Api._callbacks[6877234]"},{"key":"format","value":"JSON"},{"key":"method","value":"getUserSettings"},{"key":"sid","value":"4cf8fae8f9f07ef4ba765c58027d262b7f25de3afb1a1a6380cf7d693f669a"},{"key":"sig","value":"1107692927cb4a6242d205b2fba29d45"},{"key":"v","value":"3.0"}]}});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question