Help with Random Quote -

I have been searching for hours to find a website where I can request an API for random quotes or funny jokes… Any clues… I am trying to stick to the rules of not reverse engineering…

thanks.

1 Like

I used the Stands4 network. Other options include quotesondesign.com and forismatic.

This will give you a random quote for free

http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en

Thanks for the guidance…

I have just begun the JS part and I am testing to see if the I can JSON.stringify( json ); nothing show up on my page
I can not get the raw data to show on the page…

http://codepen.io/docwali777/pen/WxaJwE?editors=1111starting the random quote machine

Although I didn’t use this myself, I know a number of FCC’ers have used https://www.publicapis.com/andruxnet/random-famous-quotes.

Well after two hours of annoyance and half help from the chat room I was able to work it out - not that anyone in the chat room or FCC bothered to explain any of the cross browser problems that might come up - but that’s ok

//api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&jsonp=?&lang=en&callback=?

That is actually how you get the quote

thank you… how did you figure the last part of the URL… appreciate it.

The jsonp/callback stuff was the help i got in the discussion forum - no expalanation why - but it has to do with crossbrowser issues which are a jquery problem that often comes up but FCC hasn’t talked about (yet hopefully - as it’s a major issue)

Explanation’s here:http://stackoverflow.com/questions/3839966/can-anyone-explain-what-jsonp-is-in-layman-terms/3840118#3840118