It worked, and now it doesn't. Why? *fixed* (thank you!)

Hello campers, so a few weeks back I got my Random Quote Generator working, and today I came back to finish it off by getting that pesky Tweet button to work, but when I clicked the New Quote button today, it doesn’t work anymore. I haven’t changed anything so I have no idea which bit is wrong. Can you see anything that looks off? I can’t work on the Tweet button until the quotes are working again. sad panda

this bit maybe :wink:

What’s wrong with it? I’m not familiar enough with APIs or Ajax to spot mistakes yet :frowning: lol I did check both of the links individually to make sure they both still exist/were correct.

It appears you have two urls placed back to back in one string.

That’s what tells you to do.

Looks like it’s a problem with

I tried your code with different API and it worked, then tried with and it didn’t.

I also checked some other projects which use - all are broken.

Try to implement this API:

P.S. is a hack you shouldn’t assume that it will always work.

I’ve been struggling with teh same problem all day (

it’s very unreliable but I can’t find any quote page that doesn’t require it’s use…

So I did a little googling and here are the first five results, that work without - a little buggy

Codepen with examples:

All fixed :slight_smile: thanks for your help, it was crossorigin that had stopped working and I also needed ‘dataType: jsonp’ not just json. Now to fix the Tweet button!

I’m having the same troubles with for my weather app :rage:. Guess I’ll have to use (and get used to) $.ajax instead of $.getJSON

i must not be doing something right then. I can’t get any “http//” site to work. JS throws an error about CORS.

i keep getting this error, no matter which http:\ website I pick: