The project objective is in "https://www.freecodecamp.org/challenges/build-a-random-quote-machine"
Build an app which let us getting Random Quote using web service and retrieving data with JSON format. And As "User" I can tweet the quotes that I want
var tweet="https://twitter.com/intent/tweet?text="; var url = "http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=jsonp&lang=en&jsonp=?"; $.getJSON(url,function (data){ document.getElementById('quote').innerHTML=data.quoteText; document.getElementById('quotebox').style.backgroundColor =colors[Math.round(10*Math.random())]; if (data.quoteAuthor =="")document.getElementById('quote-sayer').innerHTML="Unknown"; else {document.getElementById('quote-sayer').innerHTML=data.quoteAuthor;} tweet=tweet+"' "+data.quoteText+"' ."+'\u000D Author :'+document.getElementById('quote-sayer').innerHTML; document.getElementById("tweet").href=tweet; });
B.FODIL : Front End web developer , STUDENT At : ECOLE SUPERIEUR D'INFORMATIQUE Camper At : FREECODECAMP
Thanks to QUINCY LARSON and FREECODECAMP