Hi Milo,

Though the process of URL encoding for OAuth is usually handled well by URL
encoding libraries, there are times when they don't do the right things as
far as what OAuth is expecting. Things like encoding "~" characters when
they are to remain unencoded, for example.

One thing you want to verify is that you are first URL escaping characters
in POST and query strings correctly -- according to the HTTP spec, rather
than the OAuth spec. Any character that needs URL escaping/% encoding in a
POST body needs to be encoded correctly before you even get to the OAuth
part of calculations. OAuth then prescribes that certain characters be %
encoded -- if your POST body already includes %-encoded characters, this
usually means that for the OAuth signature base string they need to encoded
again.

I have an example on github of nearly every possible UTF-8 character and how
it should be represented at different stages of the request here:
http://github.com/episod/oauth-utf8-character-map

Taylor

On Wed, Jul 28, 2010 at 10:02 AM, MiloCaruso <milocar...@gmail.com> wrote:

> I am using a "built in" url encoding method that was included in the
> oAuth library. I have seen it referenced many times and it is supposed
> to work to url encode.
>
> On Jul 28, 11:00 am, Cameron Kaiser <spec...@floodgap.com> wrote:
> > > I have searched and searched and not found a good solution to being
> > > able to send special characters in status updates using c#. I can send
> > > status updates that contain most ASCII characters (but not all).
> >
> > > fore example, this would work:
> >
> > > I love twitter
> >
> > > but this will fail:
> >
> > > twitter = love
> >
> > > I am using oAuth and the error I get back is that I am
> > > unauthenticated. This would indicate that my signature is not being
> > > generated correctly. In the one that fails I know that it is the "="
> > > that is causing the issue but can't seem to get around this. I get the
> > > same when I use any kind of Unicode character as well.
> >
> > > Does anyone have any ideas or suggestions?
> >
> > How are you encoding each of those tweets in your OAuth requests?
> >
> > --
> > ------------------------------------ personal:
> http://www.cameronkaiser.com/--
> >   Cameron Kaiser * Floodgap Systems *www.floodgap.com*
> ckai...@floodgap.com
> > -- Madness takes its toll. Have exact change ready.
> ---------------------------
>

Reply via email to