I’m trying like heck to have a twitter button to share a random quote for an project. I want to create a random quote and be able to send it to twitter.

Here’s the html:

Here’s the call:
$("#tweetIt").attr(“href”, ""+encodeURI(myQuote+"- "+myQuoter));

IF i don’t use twitter-share-button, I lose the tweet button look, but the code works. If I add twitter-share-button, I get the tweet button look, but all that process to twitter is the url of my site. Not the string content of myQuote…myQuoter.

ANY help is must appreciated! This is maddening.


Hi there! I’m unable to click on the link for your html. Could you share it again? A jsfiddle would be great. Thanks!


Here you go.


Kat, I’m curious, were you able to see the code in what I replied with yesterday?


Hi there. I was able to see your code pen, thank you. My suggestion is to take a look at the Javascript Factory functions we provide and use those to create your share button. That should get you going in the right direction.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.