Error recieved (Chrome): Uncaught SyntaxError: Unexpected token :
Script, call:
var frypeurl = 'http://www.draugiem.lv/say/ext/like_count.php';
$.ajax({
url : frypeurl,
dataType : 'jsonp',
crossDomain : true,
data : { url : 'http://example.com/' },
headers : { 'Accept' : 'application/json', 'X-Request' : 'JSON' },
success : function(json){
console.log(json);
$('#frypecount').text(json.count);
}
});
When it's accessed from browser, it returns normal result, see here. ({"count":"0"})
Have no idea what is causing it, tried it before with simply $.getJSON();, but returns same error, hence the headers, crossDomain parameters.
What could be the problem?
One thing I'd like to add, that's the biggest social network here in Latvia, and they have a weird API, functioning wise and coding too, probably. So I still have a guess that it's a problem on their side. I've messaged them, but no response yet.
frypeurl(draugiem.lv)?