So I have a script like this now: popUp("https://twitter.com/intent/tweet?text=" + greeting + poem + " -&url=" + siteURL, 704, 260);
The "poem" is a haiku and I'd love to have it like: line1 line2 line3
rather than line 1 // line 2 // line 3, which it is now. I tried inserting stuff like \n in there to no avail. "Poem" is constructed simply like line1 + " // " + line2 ...
You can try sending the standard carriage return ("\r") and line feed character ("\n") [line. separator] instead of just "/n". Further, if you can, probably browse through the external sms gateway API docs on how they read a newline character, It may vary from standards.
To add line break in Twitter, tapping ”Enter” or “Return” key while typing the tweet either in mobile or MAC or windows. A line break in Twitter means blank space between two lines text.
2. The Return key is located in the bottom-right corner, next to the space bar. Are you trying to start a new line when composing a tweet in the Twitter app on your iPhone? You will most probably automatically hit the Backspace key, located exactly where the Enter/Return button is usually displayed.
Double-tap where you want the break to occur. Tap Insert, then tap Line Break or Page Break.
As you've guessed, newline characters cannot appear in URLs.
Using a random escaping mechanism won't do you any good; you need to URL-encode the newline:
https://twitter.com/intent/tweet?text=abc%0adef
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With