Trying to make a JSONP request to yellowapi (Yellow Pages), even specifying a callback is giving me the "invalid label" error. Here is what I have so far:
$.ajax({
dataType: 'jsonp',
cache : false,
url: "http://api.sandbox.yellowapi.com/FindBusiness/",
data : "apikey="+testingPurposes+"&what="+what+"&where="+where+"
&fmt=JSON&pgLen=1&UID=127.0.0.1&callback=?",
success: function (data) {
alert(data)
}
});
It returns the right result in JSON format, but it doesn't have the "json12345678" callback at the start. Giving me an "invalid label" error.
What are my options to fix this?
P.S. All the variables are defined, apikey will be removed later.