I'm setting up a twitter feed and am trying to break up output text onto new lines for temp, wind etc but I can't get it to work.
When I test the meteobridge output using email using \n has the desired affect, but using the same input for twitter doesn't work, and prevents the tweet completely.
Have I missed something? It would be good to use the 280 character limit without it looking too busy, line breaks would really help with that.
Thanks.
Twitter new line syntax?
Moderator: Mattk
Re: Twitter new line syntax?
Is anyone able to post an example of a Twitter message that uses a line break?
Re: Twitter new line syntax?
I did not use the Meteobridge twitter upload.
But using my own PHP script a new line is simple entered as hitting the new-line-key. Not by using a special value.
An empty line one gets by using the new-line-key twice.
Maybe it works the same with the texts in the Meteobridge.
If that not works, one can probably copy / paste a new-line from another document.
Succes, Wim
But using my own PHP script a new line is simple entered as hitting the new-line-key. Not by using a special value.
An empty line one gets by using the new-line-key twice.
Maybe it works the same with the texts in the Meteobridge.
If that not works, one can probably copy / paste a new-line from another document.
Succes, Wim
Re: Twitter new line syntax?
Thanks Wim,
I know it should be possible but the meteobridge syntax doesn’t work, and neither does your suggestion I'm afraid, but thank you.
I know it should be possible but the meteobridge syntax doesn’t work, and neither does your suggestion I'm afraid, but thank you.
- jasonmfarrow
- Gold Boarder
- Posts: 249
- Joined: Mon May 25, 2020 4:21 pm
- Contact:
Re: Twitter new line syntax?
I think that this is a Twitter OAUTH/API issue and the use of line-feed and the type of quotes in the tweet text. This short thread (from 2018) has some commentary on the issue: https://cmsdk.com/php/new-line-in-twitt ... oauth.html.
Whether this can be fixed will depend on how Boris has coded the Twitter-post service within Meteobridge. The example API code (this link https://github.com/twitterdev/Twitter-A ... e_tweet.py, points to a python example) has the payload "tweet" in double quotes.
It may require some collaboration and experimentation from Boris to correctly facilitate the use of \r\n or equivalent <CR><LF> codes to correctly push through the Twitter API.
Whether this can be fixed will depend on how Boris has coded the Twitter-post service within Meteobridge. The example API code (this link https://github.com/twitterdev/Twitter-A ... e_tweet.py, points to a python example) has the payload "tweet" in double quotes.
It may require some collaboration and experimentation from Boris to correctly facilitate the use of \r\n or equivalent <CR><LF> codes to correctly push through the Twitter API.
Re: Twitter new line syntax?
Thank you for finding that Jason.
As always there's a priority for software development, and I hope this can make it onto Boris' list.
As always there's a priority for software development, and I hope this can make it onto Boris' list.