Twitter link not working in CodePen

So something weird is happening on CodePen. When I make a placeholder link for the Tweet hyperlink, it only work if I don’t point to twitter’s website:

<a id="tweet-quote" href=""  target="_blank">tweet this</a>

Does NOT work. The “tweet this” text is gone from the page.

<a id="tweet-quote" href=""  target="_blank">tweet this</a>

Works. The “tweet this” text is displayed on the page and is clickable.

Is there something blocking Twitter interactions in CodePen?


Having a link to your CodePen would be beneficial. Without that, I’m taking a bit of a guess here.

AFAIK, the Twitter feature should work fine in CodePen. However, if you’re running an ad-blocking extension, it may also be blocking the Twitter button/text.

[SOLVED] AdBlock Plus is the culprit! Darn browser extensions working too well!

I’ve disabled my adblock but still get “blocked” when I click the twitter link at bottom of my tribute page

FWIW, I tried the link from my code editor live share and it works. Just doesn’t work when done inside CodePen.

twitter is blocking from embeds (which your page in codepen is one), you can try setting target=_"blank" or target="_top" in your anchor element, but the tests pass anyway so do not worry

1 Like

Thanks. I set the target but it still doesn’t work from the codepen. But it works from the exported project when loaded into a browser and, like you said, the tests passed… so on with the next one!