Problems placing the quote on a twitter

Hello, I am making the page of a random quote machine. What I don’t know is how to embed my quote on twitter. I use the link provided, but it only opens the box to write, but does not place the quote.

Link to the challenge:

The format is like this: https://twitter.com/intent/tweet/?text=This+is+a+quote
You just replace the quote spaces with a “+”.

It worked perfect for me. The problem I have now is that I do not want to put a fixed twitter if it does not change. That is, I want to put a text that I have in a state that is changing.
In the text = text I put a constant, but it didn’t read it.

You can use your state as the text. I don’t know what you mean by “it didn’t read it” without seeing your code.

Yes, I already solved it. I ask you something else if you can. I don’t know how to make it random, I managed to make it cyclical, but not random. Do you know how I could do it?

Use Math.random().

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