Invalid Label Error with JSON request

2024/2/27 8:22:37

I've read about this a lot and I just can't figure it out. It has nothing to do with MY code, it has to do with the feed or something because if I swap it with a Twitter feed it returns an Object object which is perfect.


And i get an "invalid label" error. Any ideas?

Also, a side note, I've tried the AJAX method as well:

$.ajax({url: '',dataType: 'jsonp',data: 'count=1',success: function(msg){console.log(msg)}

and both give the same exact error, and both work fine with Flickr and Twitter examples, so it must be something to do with the feed, but I dont have access to the feed, but I could ask them to fix something IF it's their issue.


Make sure that the server side can handle the JSONP request properly. See here for example.

Edit: It seems that the server doesn't wrap the returned JSON object with the callback function name. The server should return:

callback( { json here } )

and not

{ json here }

Related Q&A

Point-in-rectangle testing

I have this matrix /// as if the create a rectangle int [][] loc = {{5, 15},//(x1, y1){5, 30}, // (x1, y2){20, 15},// (x2, y1){20, 30}, // (x2, y2) }// this are the point that i want to check if they a…

Jquery - hide on click anywhere on document

I have a div that hides whenever you click outside of it but Im having some trouble getting certain links inside the div to work (and not hide the div).$(document).click(function() {fav.hide(); }); the…

How to extend XMLHttpRequest object in JavaScript?

I would like to extend the existing XMLHttpRequest object so that it should work with all the browsers. Now I have been trough with JS inheritance and things however before starting I would like to see…

Highcharts chart going blank on zoomType: x area range zoom?

Ok, so I have a Highcharts chart displaying data correctly from a database; but the moment I zoom in, the chart goes blank?Here is the chart HTML:<div class="content" id="content&quo…

Google Chart vAxis values are not showing

I am working on various graphs and I am showing multiple graphs in a single page. Somehow vAxis values are not showing on some graphs but it showing in some independent (we can say its in different sec…

React Native: uri image not showing on android but displays on the iOS Simulator

I am working on a react-native app. I am fetching some images from an API and displaying them as a flat-list. The problem is that these images show perfectly on the iOS Simulator but do not display on …

Shorthand function for checking whether a property exists [duplicate]

This question already has answers here:Test for existence of nested JavaScript object key(64 answers)Closed 8 years ago.Can you guys help me make a shorthand function determining whether an object prop…

Select text inside span onClick

Im using a text span field and want to select the text inside on click, im not using jQuery, so i wonder if i can do it with java functions?here is the code:<div id="container"><h2&…

Why does React Native app crash when clicking on debug in Android emulator?

React Native app shows error when clicked on debug in Android emulator Attempt to invoke interface method java.lang.String com.facebook.react.bridge.Cat alystInstance.getSourceURL(on a null object refe…

JQuery Visual Diff Plugin

is there a JQuery visual diff plugin that anybody knows about. Something like you would see on GitHub, BitBucket, or any standard source control site?I have found this…