# Tweet Button does not work

**URL:** <https://forum.freecodecamp.org/t/tweet-button-does-not-work/51165>\
**Category:** I Built This\
**Created:** [November 2, 2016, 4:11pm UTC](https://forum.freecodecamp.org/t/tweet-button-does-not-work/51165 "2016-11-02T16:11:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TatjanaBezsazna](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@TatjanaBezsazna](https://forum.freecodecamp.org/u/TatjanaBezsazna)\
**Post date:** [November 2, 2016, 4:11pm UTC](https://forum.freecodecamp.org/t/tweet-button-does-not-work/51165/1 "2016-11-02T16:11:48Z")

</div>

Hello All,

I have a problem with my tweet button - it just doesn’t pass a quote in. Could you please review what might be the problem?

[My Qoute Machine](http://codepen.io/TatjanaBezsazna/pen/XjvRyy)

---

<div class="post-metadata">

**Author:** ![zsoltime](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/zsoltime/32/4252_2.png) [@zsoltime](https://forum.freecodecamp.org/u/zsoltime)\
**Post date:** [November 2, 2016, 4:31pm UTC](https://forum.freecodecamp.org/t/tweet-button-does-not-work/51165/2 "2016-11-02T16:31:38Z")

</div>

First, you misspelled quote on line #14. Second, you need to move `tweetQuote` variable inside the event handler before `window.open`, so you get the text content when you click on the tweet button, not when you load the page.

---

<div class="post-metadata">

**Author:** ![TatjanaBezsazna](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@TatjanaBezsazna](https://forum.freecodecamp.org/u/TatjanaBezsazna)\
**Post date:** [November 3, 2016, 9:37am UTC](https://forum.freecodecamp.org/t/tweet-button-does-not-work/51165/3 "2016-11-03T09:37:41Z")

</div>

Thank you! it works perfectly now! 🙂

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:04pm UTC](https://forum.freecodecamp.org/t/tweet-button-does-not-work/51165/4 "2021-06-01T18:04:06Z")

</div>

Closed on June 1, 2021, 6:04pm UTC


