# Random Quote Machine (Twitter button) Still stuck here

**URL:** <https://forum.freecodecamp.org/t/random-quote-machine-twitter-button-still-stuck-here/141217>\
**Category:** General\
**Created:** [August 11, 2017, 8:01pm UTC](https://forum.freecodecamp.org/t/random-quote-machine-twitter-button-still-stuck-here/141217 "2017-08-11T20:01:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonylasarna](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tonylasarna/32/67455_2.png) [@tonylasarna](https://forum.freecodecamp.org/u/tonylasarna)\
**Post date:** [August 11, 2017, 8:01pm UTC](https://forum.freecodecamp.org/t/random-quote-machine-twitter-button-still-stuck-here/141217/1 "2017-08-11T20:01:24Z")

</div>

I can’t find a way to make the twitter button to tweet a [Random Quote Machine](https://codepen.io/aramirez1/pen/JWaZXw)quote from my list, only the default setting it comes with. Could anybody suggest somewhere I could get something to guide myself with?

Anybody could shed some light on how to proceed?

---

<div class="post-metadata">

**Author:** ![PortableStick](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/portablestick/32/65591_2.png) [@PortableStick](https://forum.freecodecamp.org/u/PortableStick)\
**Post date:** [August 11, 2017, 8:11pm UTC](https://forum.freecodecamp.org/t/random-quote-machine-twitter-button-still-stuck-here/141217/2 "2017-08-11T20:11:24Z")

</div>

The URL will have a `tweet` parameter. Check out the documentation here:  
[https://dev.twitter.com/web/tweet-button/web-intent](https://dev.twitter.com/web/tweet-button/web-intent)

---

<div class="post-metadata">

**Author:** ![tmpbit](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tmpbit/32/48843_2.png) [@tmpbit](https://forum.freecodecamp.org/u/tmpbit)\
**Post date:** [August 11, 2017, 8:17pm UTC](https://forum.freecodecamp.org/t/random-quote-machine-twitter-button-still-stuck-here/141217/3 "2017-08-11T20:17:42Z")

</div>

You put only `https://twitter.com/intent/tweet` in HTML window. You should append some text to it according to the description on the website @PortableStick provided. You will have to do it using JavaScript.

---

<div class="post-metadata">

**Author:** ![mcockrell1](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mcockrell1](https://forum.freecodecamp.org/u/mcockrell1)\
**Post date:** [August 11, 2017, 8:21pm UTC](https://forum.freecodecamp.org/t/random-quote-machine-twitter-button-still-stuck-here/141217/4 "2017-08-11T20:21:09Z")

</div>

i think there is a problem with your function though. every once in a while it displays undefined.

i believe its this line:

var randomNumber = (Math.floor(Math.random() \* Quotes.length - 1 ));

correct me if im wrong but i think this does the multiplication and subtraction first and then rounds the number but i think what you want to do is round the random number first, then multiply it and subtract?

---

<div class="post-metadata">

**Author:** ![tonylasarna](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tonylasarna/32/67455_2.png) [@tonylasarna](https://forum.freecodecamp.org/u/tonylasarna)\
**Post date:** [August 11, 2017, 8:29pm UTC](https://forum.freecodecamp.org/t/random-quote-machine-twitter-button-still-stuck-here/141217/5 "2017-08-11T20:29:35Z")

</div>

yeah, I just got rid of the (-1) and works better.Thanks

---

<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:** [January 17, 2021, 8:42pm UTC](https://forum.freecodecamp.org/t/random-quote-machine-twitter-button-still-stuck-here/141217/6 "2021-01-17T20:42:55Z")

</div>

Closed on January 17, 2021, 8:42pm UTC


