Never mind, the bug was in my own script. It was setting empty values
of oauth_token, and oauth_secret.
I corrected the problem and all works fine again.


On Aug 27, 4:36 pm, "D. Smith" <emai...@sharedlog.com> wrote:
> Hello! I started getting 401 'count not authenticate' errors starting
> about 2 days ago when I try to send tweet via API.
> I use OAuth, use php pecl OAuth for that, just like I did before. The
> last tweet was successfully posted from my website was 2 days ago
>
> Here are the headers from the debug (I changed the values of my token/
> secret here for security)
>
> [headers_sent] => POST /1/statuses/update.json HTTP/1.1
>
> User-Agent: PECL-OAuth/1.0-dev
>
> Host: api.twitter.com
>
> Accept: */*
>
> Content-Length: 249
>
> Content-Type: application/x-www-form-urlencoded
>
> status=%20Hey
> %20everyone&oauth_consumer_key=gdsfgdsfgdfgdf&oauth_signature_method=HMAC-
> SHA1&oauth_nonce=12299221034c78207659bdc5.73793953&oauth_timestamp=12829410 
> 46&oauth_version=1.0&oauth_token=&oauth_signature=ffff11111s8wiINcB9FKX0UjY c
> %3D
>
> And this is the received headers from API:
>
> [headers_recv] => HTTP/1.1 401 Unauthorized
>
> Date: Fri, 27 Aug 2010 20:30:46 GMT
>
> Server: hi
>
> Status: 401 Unauthorized
>
> WWW-Authenticate: Basic realm="Twitter API"
>
> X-Runtime: 0.00273
>
> Content-Type: application/json; charset=utf-8
>
> Content-Length: 75
>
> Cache-Control: no-cache, max-age=300
>
> Set-Cookie: k=67.19.114.2.1282941046438939; path=/; expires=Fri, 03-
> Sep-10 20:30:46 GMT; domain=.twitter.com
>
> Set-Cookie: guest_id=128294104644479603; path=/; expires=Sun, 26 Sep
> 2010 20:30:46 GMT
>
> Set-Cookie:
> _twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCK3OPrUqAToHaWQiJWVhNjkyYjRiMTJlM2Uw
> %250AMzUwOWYyNDQxNWI1MThmNzk5IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy
> %250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--428e590fbfbf78ddef85c177fb4f 
> 958444ef969c;
> domain=.twitter.com; path=/
>
> Expires: Fri, 27 Aug 2010 20:35:46 GMT
>
> Vary: Accept-Encoding
>
> Connection: close
>             [body_recv] => {"request":"/1/statuses/
> update.json","error":"Could not authenticate you."}

-- 
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

Reply via email to