Oleg  Vodolazsky
Oleg Vodolazsky

Reputation: 226

Twitter share link with query string

previous answers won't help me in solving this task. Ive got link:

<a href="https://twitter.com/intent/tweet?url=http://mydomain/?param1=something&amp;param2=somtehing&amp;param3=something" target="_blank">link
      </a>

Here I got link with multiple params in query string, it should lead me to http://mydomain/?param1=something&param2=somtehing&param3=something but when I following this link, that what I see: enter image description here What's my problem, what am I doing wrong?

Upvotes: 3

Views: 2280

Answers (1)

Carl Reid
Carl Reid

Reputation: 780

You need to URL encode your URL and pass it as the parameter. So the result would be:

<a href="https://twitter.com/intent/tweet?url=http%3A%2F%2Fmydomain%2F%3Fparam1%3Dsomething%26param2%3Dsomtehing%26param3%3Dsomething" target="_blank">link
      </a>

Upvotes: 3

Related Questions