Yeah, you were correct.  My encode() function was doing something
whacky with +'s.

On Feb 25, 8:42 am, Berto <mstbe...@gmail.com> wrote:
> So I've been able to get everything working except for posting things
> with spaces or any special characters that get encoded.  All of the
> regular oauth parameters are being encoded correctly, because anything
> without any extra parameters works fine so I'm not quite sure what
> needs to be fixed.  A good example is posting a status.  If I go to
> post a status, I get:
>
> With the status: "Test!":
> Signature Base String: POST&http%3A%2F%2Fwww.twitter.com%2Fstatuses
> %2Fupdate.json&oauth_consumer_key%3DZhJuTh3GCDkGIDm2R4ocNQ
> %26oauth_nonce%3D1267108786%26oauth_signature_method%3DHMAC-
> SHA1%26oauth_timestamp%3D1267108589%26oauth_token%3D111605519-
> cDU56Y7CYcZyTSdEIjFIWqMLyPzpPDnOpIzz80sH%26oauth_version%3D1.0%26status
> %3DTest%2521
>
> And a final POST request of:
>
> { POST url =http://www.twitter.com/statuses/update.json, params =
> oauth_consumer_key=ZhJuTh3GCDkGIDm2R4ocNQ&oauth_nonce=1267108786&oauth_signature_method=HMAC-
> SHA1&oauth_timestamp=1267108589&oauth_token=111605519-
> cDU56Y7CYcZyTSdEIjFIWqMLyPzpPDnOpIzz80sH&oauth_version=1.0&status=Test
> %2521&oauth_signature=eiLdCr8fCXcUpFxsOPn9vtK%2BCZw%3D }
>
> If I try one with spaces (This is a test), I get:
>
>  Signature Base String: POST&http%3A%2F%2Fwww.twitter.com%2Fstatuses
> %2Fupdate.json&oauth_consumer_key%3DZhJuTh3GCDkGIDm2R4ocNQ
> %26oauth_nonce%3D1267109321%26oauth_signature_method%3DHMAC-
> SHA1%26oauth_timestamp%3D1267108551%26oauth_token%3D111605519-
> cDU56Y7CYcZyTSdEIjFIWqMLyPzpPDnOpIzz80sH%26oauth_version%3D1.0%26status
> %3DThis%2Bis%2Ba%2Btest
>
> { POST url =http://www.twitter.com/statuses/update.json, params =
> oauth_consumer_key=ZhJuTh3GCDkGIDm2R4ocNQ&oauth_nonce=1267109321&oauth_signature_method=HMAC-
> SHA1&oauth_timestamp=1267108551&oauth_token=111605519-
> cDU56Y7CYcZyTSdEIjFIWqMLyPzpPDnOpIzz80sH&oauth_version=1.0&status=This
> %2Bis%2Ba%2Btest&oauth_signature=4ENIpGIfzU3nY74%2FFIYTYRboHEQ%3D }
>
> Anyone have an idea of where I'm encoding incorrectly or if perhaps my
> parameters are in the incorrect order?  I tried reading the oauth spec
> and perusing the archives, but to no avail.

Reply via email to