millermedeiros/requirejs-plugins — Issue #7: Flickr JSON doesn't load
Author: Integralist
Created: 2011-12-15 11:04:01+00:00
State: open

Load the following URL in your browser...

`http://api.flickr.com/services/feeds/photos_public.gne?id=49297289@N08&lang=en-us&format=json` - this wraps the json response with a function called `jsonFlickrFeed`.

If I try to do...

```js
window.jsonFlickrFeed = function(data) {
console.log(data);
}

require(['async!http://api.flickr.com/services/feeds/photos_public.gne?id=49297289@N08&lang=en-us&format=json']);
```

...I get the data but I then get a timeout error `Uncaught Error: Load timeout for modules: async!http://api.flickr.com/services/feeds/photos_public.gne?id=49297289@N08&lang=en-us&format=json`

If I try a different URL format (e.g. just return plain JSON data)...

`http://api.flickr.com/services/feeds/photos_public.gne?id=49297289@N08&lang=en-us&format=json&nojsoncallback=1`

...then I get the error `Uncaught SyntaxError: Unexpected token :` (followed by the same timeout error above) as the browser considers the returned JSON data to be invalid. But yet if I run the returned data through a validator it passes?

Any ideas?

I noticed this on my own JSONP plugin (https://github.com/Integralist/RequireJs-Example/blob/master/Assets/Scripts/Plugins/jsonp.js) and then thought I would check yours to see if it had the same issues and it did.