Twitter-share-button


#1

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

Here’s the html:
Tweet

Here’s the call:
$("#tweetIt").attr(“href”, "https://twitter.com/home?status="+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.


#2

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


#3

Here you go.


#4

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


#5

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.


#6

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