I followed the whole oAuth chain to aquire an accesstoken for my
application:
Call 1:
sent:
https://api.twitter.com/oauth/request_token?oauth_consumer_key=[mykey]&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1293014232&oauth_nonce=OgIwk4&oauth_signature=[signature]

result:
oauth_token=[token]&oauth_token_secret=[tokensecret]&oauth_callback_confirmed=true

Call 2: (after receiving a pincode)
sent:
https://api.twitter.com/oauth/access_token?oauth_consumer_key=[mykey]&oauth_token=[token]&oauth_signature_method=HMAC-SHA1&oauth_verifier=[pincode]&oauth_timestamp=1293014245&oauth_nonce=UZN6pW&oauth_signature=[signature]

result:
oauth_token=[accesstoken]&oauth_token_secret=[accesstokensecret]&user_id=42198282&screen_name=kooijtje

 Call 3: (i should be able to do a search since i have an access
token)
sent:
http://api.twitter.com/1/users/search.xml?q=[searchterm]&oauth_consumer_key=[mykey]&oauth_token=[accesstoken]&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1293014246&oauth_nonce=nV8zJ7&oauth_signature=[signature]

sent:
http://api.twitter.com/1/users/search.xml?oauth_consumer_key=[mykey]&oauth_nonce=wwQs4p&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1293024508&oauth_token=[accesstoken]&oauth_version=1.0&q=[Searchterm]&oauth_signature=[signature]


Both are giving the following 401 error with this response:
xml version="1.0" encoding="UTF-8"?>
<hash>
  <request>/1/users/search.xml?
oauth_consumer_key=[mykey]&amp;oauth_nonce=dD7PvN&amp;oauth_signature_method=HMAC-
SHA1&amp;oauth_timestamp=[timestamp]&amp;oauth_token=[accesstoken]&amp;oauth_version=1.0&amp;q=[Searchterm]&amp;oauth_signature=[signature]</
request>
  <error>Incorrect signature</error>
</hash>

Currently through the lib i am using all parameters (including the q)
are used to calculate the oauth_signature, is this wrong? Should only
the oauth_* parameters be used? I tried this but still incorrect
signature error.
The algorithm for calculating seems to be signature correct since i am
able to succesfull get an accesstoken?

Any idea's?

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

Reply via email to