Answer the question
In order to leave comments, you need to log in
What is wrong with JSONP request?
I'm trying to send a request to the VK api, via Long Polling, I use JSONP for cross-platform.
All data is received successfully (see screenshot), but the following error is generated:
Uncaught SyntaxError: Unexpected token : What 's wrong
?
(function() {
var server = 'imv4.vk.com/im6769';
var key = '7296c8b6ca7a357540e98eea17d4bcdc7b831c94';
var ts = 1710680601;
var poll = function() {
$.ajax({
url: 'https://'+server+'?act=a_check&key='+key+'&ts='+ts+'&wait=25&mode=8&access',
dataType: 'jsonp',
crossDomain: true,
type: 'GET'
});
};
setInterval(function() {
poll();
}, 2000);
})()
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