Hi Taylor, I tried %20 along with a lot of other things and was the only thing that worked in all places -- the web, Twitter clients, and SMS messages to cell phones. Other than this problem, it has worked great for nine months. If Twitter has made changes such that %20 will now work where it didn't before, I'd be happy to switch. But, my guess is that this bug would apply equally well to the %20s.
I also believe that this is a new bug, as I've been using the same code which makes sure I'm under the limit for a long time. I would have to dig through my database of previous puzzles to find out for sure. I might be able to work around this by setting my internal limit to lower than of 140, but I don't know the exact number. Tweets with as few as 136 characters are being rejected. As a *temporary* workaround, I modified it to check if the tweet is >=136 and chop off the URL in this case. That pushed it quite a bit under 140 and it works fine: http://twitter.com/Puzzazz/status/9985983801 ,I vote for fixing the bug. If that can't happen, can I at least find out what the true limit is? That way, I don't have to figure it out via trial and error. /Roy On Thu, Mar 4, 2010 at 7:45 AM, Taylor Singletary < taylorsinglet...@twitter.com> wrote: > Hi Roy, > > You shouldn't be sending spaces as " " -- that's HTML entity encoding. > It's best to send space characters as "%20" instead. > > For example: > > You'd set your POST body to: > > status=There%20is%20%20%20%20%20space%20for%20love%20in%20%20%20the%20universe > > If you were trying to set the status > "There is space for love in the universe" > > In your signature base string for OAuth you'd have to encode those spaces > one more time: > > POST&http%3A%2F%2Fapi.twitter.com > %2F1%2Fstatuses%2Fupdate.xml&oauth_consumer_key%3Dri8JxYK2ddwSV5xIUfNNvQ%26oauth_nonce%3DulF0XQetLMOm5Sr9Yrp027Hzu2mPoTuTqFgshncHBo%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1267717205%26oauth_token%3D819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw%26oauth_version%3D1.0%26status%3DThere%2520is%2520%2520%2520%2520%2520space%2520for%2520love%2520in%2520%2520%2520the%2520universe > > > Not all Twitter API clients will choose to preserve multiple spaces on > display though. > > Taylor > > > On Wed, Mar 3, 2010 at 11:13 PM, Roy Leban <r...@royleban.com> wrote: > >> Twitter is rejecting tweets as too long when the nbsp character is >> used. Here is an example tweet in plain text >> >> Clue 5 of 15: R _ C _ _ _ N _ N _ _ E _ _ _ T E R _ _ _ >> _ N E E R _ N _ _ R _ C U L T U R E http://www.puzzazz.com/s348 >> [140 chars] >> >> And, as I'm sending it with the nbsp characters: >> >> Clue 5 of 15: R _ C _ >> _ _ N _ >> N _ _ E _ >> _ _ T E R _ >> _ _ _ N E E R >> _ N >> >> _ _ R _ C U L T U R E >> http://www.puzzazz.com/s348 >> >> If the nbsp's are each counted as 6 characters, this would be 400 >> chars, but Twitter accepts tweets like this. For example, this tweet: >> >> http://twitter.com/Puzzazz/status/9781320047 >> >> is 114 chars but I send 304 chars with the nbsp's. >> >> I have a guess that this only happens when the resulting tweet is >> exactly 140 chars. To test this theory, I just modified the site to >> shorten that tweet below 140. Sure enough, it works: >> >> http://twitter.com/Puzzazz/status/9963348931 >> > >