Need help with twitter button on random quote machine

Need help with twitter button on random quote machine
0

#1

Here is my codepen http://codepen.io/Tcar/pen/XjadzB?editors=0010 . I don’t know how to display quote in twitter status box.


#2

You’re so nearly there!

Change 'https://twitter.com/intent/tweet?

to

'https://twitter.com/intent/tweet?text='+ json.quoteText

It should work.


#3

yeah, with that i just tweet the first quote


#4

I did it. a litle complicated, but here it is… $("#desni").click(function(){
var textToTweet=$(".quote").text()+ ’ -’ + $(".autor").text();

  var tweetLink = 'https://twitter.com/intent/tweet?text=' + encodeURIComponent(textToTweet);

window.open(tweetLink,’_blank’);});
Now just to put a litle make up and that’s it :smiley: