Alrighty guys, I'm trying to get myself started with using an API called tinysong that'll use XML HTTP objects to take in specially formatted URLs to return a json object with song metadata.

See code . (BTW I have replaced myApiKey with my own API key.)

I believe I've done everything correctly, but can't see where I'm going wrong when I get a cross-origin request error in the error log through Firefox's debugging... thing.

However -- if I try doing entering the url manually through my browser, i.e.,

http://tinysong.com/b/Girl+Talk+Ask+About+Me?format=json&key=[2] <myApiKey>

I do get JSON-formatted output, namely this:

{"Url":"http:\/\/tinysong.com\/knej","SongID":13963,"SongName":"Ask About Me","ArtistID":77,"ArtistName":"Girl Talk","AlbumID":117512,"AlbumName":"Night Ripper"}

Wat do?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.