Tweet Button Only Shows CodePen URL


#1

So, I do most of the challenges on my local editor, test the code locally and then post to CodePen. Here’s my CodePen: https://codepen.io/laddeyboy/pen/PKzMwe

So locally, I click on tweet, and my quote pre-populates into the twitter window for tweeting. However, on codepen, I click tweet and all i get is my CodePen url populated to tweet.

I canNOT figure out why it works locally, but not on CodePen. Any help is appreciated??


#2

I’ve figured that the issue is linked to your Tweet button class=“twitter-share-button”. I have no idea where you came to the class, but as soon as you get rid of it, your app will work.

If I were you, I’d also change your Twitter links to this 'https://twitter.com/intent/tweet?text='


#3

N4thyra, thank you! Removing the button class did work so my quote is populating into the twitter window. That class came directly from the twitter html code from their API. Twitter’s publish site, it where I pulled that whole line of code from.
Once I removed that class though, i destroyed my twitter button look, so it doesn’t look like a button anymore. Will have to figure out what’s going on with that now.

Thanks again!