Hi,

We're readying a revision of our OAuth implementation that will give more
feedback on what went wrong -- including showing the signature base string
generated on our side when there's a signature mis-match.

The best thing you can do to solve your OAuth woes is to forget about
actually making HTTP calls to twitter.com for a bit. The documentation at
http://dev.twitter.com/pages/auth includes detailed signature base strings,
signatures, and parameters -- including consumer keys and secrets -- that
give you everything you need to make a matching implementation without even
issuing a single HTTP request.

Use those examples as "golden examples" -- take the inputs like oauth_nonce,
oauth_timestamp, the resource, the method, the consumer key, the consumer
secret, etc. and try to recreate the signatures exactly as they are
calculated in the documentation. I wouldn't recommend moving on to using
real, live timestamp and nonce values (and your own keys) until you can
reliably reproduce all of the signatures in that documentation. Once you're
able to repeat the signatures verbatim, you can have confidence that your
OAuth signature generation steps are kosher and then move on to actually
trying real calls.

Taylor Singletary
Developer Advocate, Twitter
http://twitter.com/episod


On Sun, May 9, 2010 at 12:29 AM, Morr. Liang <[email protected]> wrote:

> I'm trying to create an twitter client using c++.Since it's written in
> c++,not much infomation I found.
>
> When I try to request a token,it kept saying "Failed to validate oauth
> signature and token".
> I don't know where I went wrong.So I cannot fix it.
> I just want more details.
>
> One of webs in my country supports oauth.I try using oauth on it.At
> first,I failed.But at least it provides me infomations like "signature
> doesn't match,expected:xxxxxx,received:oooooo".So I finally figure out
> where I went wrong.
>
> But twitter provides so little info.I don't even know wether the
> timestamp or the signature is wrong or some other stuff cause the
> problem.
>
> So,how can I retreive more details?
>

Reply via email to