We are trying to use the meetup.com API jquery getJSON () method and are running in some problems We can walk in firebug
$ GetJSON ('http://api.meetup.com/events.json?group_urlname=closing-the-NOLA-Gap&key=ourkey', function (data) {console.log (data)}); We can see calls taking a while. We can observe the feedback header and see that the content size is 42K, the content body (shown by firebug) is empty! How is this possible?
When we point to the url in the browser, we see all the appropriate Jason formatted text on the page.
What are we losing?
PS We've tried $ .jax, and $$ - identical results with each. We have also tried it with 3 parameters where the first URL is, the second is zero, and the third is the callback.
Make sure you have the callback =? is ... because it is a remote domain, you need to use it (which is the callback =? triggers) like this:
$ . GetJSON ('http://api.meetup.com/events.json?group_urlname=closing-the-NOLA-Gap&key=ourkey&callback=?', Function (data) {console.log (data);}) ; From the docs:
If the URL contains the string in the URL
"callback =?"is included, then the request is considered as JSONP instead. See thejsonpdata type discussion for more information.
Comments
Post a Comment