[twitter-dev] Re: 'Incorrect signature' on status update with OAuth when verify credentials works

2010-09-28 Thread Angelus
After some try and fail I finally discovered I needed a utf8_encode in
the status otherwise twitter responded with the incorrect signature.

Hope this helps if anyone is having the same problem.

On Sep 28, 11:14 am, Angelus  wrote:
> Hi,
> since a few days ago, my status update calls have stopped working.
> They actually worked sometimes which made it even more strange.
> Recently I have found a thread with some1 with the same problem I had,
> and he tested the status update without accents or special characters,
> and it worked.
>
> So I went on and tested, and it worked too.
>
> Why do I recieve the 'Incorrect signature' error every time I try to
> update a status with accents or special characters?
> What should I do?
>
> I'm using PHP with TwitterOAuth library and it worked fine for
> everything until now :/
>
> Any help is appretiated

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] 'Incorrect signature' on status update with OAuth when verify credentials works

2010-09-28 Thread Angelus
Hi,
since a few days ago, my status update calls have stopped working.
They actually worked sometimes which made it even more strange.
Recently I have found a thread with some1 with the same problem I had,
and he tested the status update without accents or special characters,
and it worked.

So I went on and tested, and it worked too.

Why do I recieve the 'Incorrect signature' error every time I try to
update a status with accents or special characters?
What should I do?

I'm using PHP with TwitterOAuth library and it worked fine for
everything until now :/

Any help is appretiated

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Re: Problems on production server with same code

2010-09-10 Thread Angelus
That was exactly the problem.
Server was about 20 min ahead of twitter's time, working perfectly
now.

Thanks for the help.

On Sep 10, 2:20 pm, Colin Hill  wrote:
> Angelus,
>    I ran into this the other day. Check the clock on your production
> system and sync it to your favorite authorotative time source
> (tock.usno.navy.mil or whatever) to bring it in line with the twitter
> servers which presumably use one of the stratum 1 NTP time sources. Too
> large a time skew will result in nonce problems.
>
> -- Colin
>
> On 9/10/10 12:59 PM, Angelus wrote:
>
>
>
> > Hello, I'm migrating our current sistems that used old basic
> > authentication on twitter to OAuth and I'm having quite a problem.
>
> > In our php projects I'm using a TwitterOAuth lib, very well written
> > and worked perfectly on my development machine.
>
> > Unfortunately the same code fails to work on our production
> > environment with an error that has absolutely no relation with the
> > actual error (whatever it is)
> > The error I recieve is:
>
> > Invalid / used nonce
>
> > but the nonce is generated with timestamp + random number. It's not
> > possible to have been already used.
>
> > an example of the POST body is here
>
> > oauth_consumer_key=<-- THE KEY --
> >> &oauth_nonce=607fa4w67ww8433f2ce1ec091e4b1e0daac&oauth_signature=8NrnKsp1Yu
> >>  ULvltlu
> > %2BJOeG3ysGM%3D&oauth_signature_method=HMAC-
> > SHA1&oauth_timestamp=1284129911&oauth_token=<-- THE TOKEN --
> >> &oauth_version=1.0&status=Status%20to%20change
>
> > The code generating this couldn't be wrong since it works perfectly on
> > development environment.
> > I can't understand what is wrong
>
> > Please, any help is appreciated

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en


[twitter-dev] Problems on production server with same code

2010-09-10 Thread Angelus
Hello, I'm migrating our current sistems that used old basic
authentication on twitter to OAuth and I'm having quite a problem.

In our php projects I'm using a TwitterOAuth lib, very well written
and worked perfectly on my development machine.

Unfortunately the same code fails to work on our production
environment with an error that has absolutely no relation with the
actual error (whatever it is)
The error I recieve is:

Invalid / used nonce

but the nonce is generated with timestamp + random number. It's not
possible to have been already used.

an example of the POST body is here

oauth_consumer_key=<-- THE KEY --
>&oauth_nonce=607fa4w67ww8433f2ce1ec091e4b1e0daac&oauth_signature=8NrnKsp1YuULvltlu
%2BJOeG3ysGM%3D&oauth_signature_method=HMAC-
SHA1&oauth_timestamp=1284129911&oauth_token=<-- THE TOKEN --
>&oauth_version=1.0&status=Status%20to%20change

The code generating this couldn't be wrong since it works perfectly on
development environment.
I can't understand what is wrong

Please, any help is appreciated

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en