Hi Leon, Your authorization header should contain only oauth_* parameters -- you don't need to include other parameters involved in the request.
You'll also need to encode your POST body appropriately before sending it to Twitter. I also recommend normalizing your space characters to use %20 instead of plus. In this case, your POST body should be: status=%23job%20Accountmanager%20%27s-Hertogenbosch. Your signature base string is almost correct, assuming you had normalized the "+" into "%20" and were sending the properly encoded POST bod. A hyphen "-" is not a reserved character and shouldn't be encoded. Taylor On Fri, Aug 27, 2010 at 3:15 AM, Leon Buijsman <[email protected]>wrote: > We have oauth/twitter running now from a self-built Oracle PL/SQL > procedure, but are running in problems with a few characters. The > hyphen/minus is the most pressing one. It is correctly encoded to %2D, > but whatever we try, it is giving me back a 401. > > See below a print-out from our base string, header, post and response > code. Could you run a tweet like [#job Accountmanager 's- > Hertogenbosch.] through your code and see whether it posts at all? > > signature base string: > POST&https%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses > %2Fupdate.xml&oauth_consumer_key%3DGoUO2h7f9eAARwHnEMuAQ%26oauth_nonce > %3D3cb55e8592ab4dcd71fa129aad78b139%26oauth_signature_method%3DHMAC- > SHA1%26oauth_timestamp%3D1282903253%26oauth_token%3D183257949- > xFjBpQpKdwuqF3Qjk9bG7AEXvJNIoBSU995tg8CM%26oauth_version%3D1.0%26status > %3D%2523job%2520Accountmanager%2520%2527s%252DHertogenbosch. > header: > OAuth realm="", oauth_nonce="3cb55e8592ab4dcd71fa129aad78b139", > oauth_signature_method="HMAC-SHA1", oauth_timestamp="1282903253", > oauth_consumer_key="GoUO2h7f9eAARwHnEMuAQ", oauth_token="183257949- > xFjBpQpKdwuqF3Qjk9bG7AEXvJNIoBSU995tg8CM", oauth_signature="Bv6Cz > %2Frj2J6fMd%2B8UvwtUYuMkgE%3D", oauth_version="1.0", status=%23job > %20Accountmanager%20%27s%2DHertogenbosch. > > body: > status=#job+Accountmanager+'s-Hertogenbosch. > > statuscode: > 401 > > response: > /1/statuses/update.xml Incorrect signature > > -- > 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 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
