Help with Random Quote -

Help with Random Quote -
0.0 0

#1

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.


#2

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


#3

This will give you a random quote for free

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


#4

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


#5

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


#6

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


#7

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


#8

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)


#9

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