Hi, everybody!
I need some help with my Random Quote Machine. Actually I have an issue:
- Function to tweet it doesn’t work at all and I don’t understand why
I will be happy to het some advice about dealing with it
My project: http://codepen.io/KateHamster/pen/dXqqby
Hello Kate
for the slow quotes, you can remove:
https://crossorigin.me/http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp&jsonp=?
for
//api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp&jsonp=?
You can now see that the crossorigin website is loading slowly and makes your machine loading slow too, obviously.
If you don’t really need this crossorigin website, leave it. It is now faster.
Hope it helps
Adrien
Thank you, it helped
Before it didn’t worked without it
Still have a problem with the tweeting out, maybe someone can me give me a clue what am I doing wrong
Little change in JS:
var setQuote = function(){
$.getJSON("//api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp&jsonp=?", function(data){
$("#quote").text(data.quoteText);
$("#author").text(data.quoteAuthor);
$("a#twitter-link").attr("href","https://twitter.com/intent/tweet?text=" +data.quoteText+" - "+data.quoteAuthor+ "#quote");
});
};
Then modify:
It should make the job