01-21-2010 11:19 PM - edited 01-21-2010 11:23 PM
I'm still receiving the 401, Invalid Signature...
_token&oauth_consumer_key%3d5xpsty524wuc2pkkmz2ne3 qf%26oauth_nonce%3d5028662916445050177%26oauth_sig nature_method%3dHMAC-SHA1%26oauth_timestamp%3d1264 133371%26oauth_version%3d1.0
I have checked the following parameters parameters: oauth_nonce, timestamp, consumer_key, oauth_version, oauth_signature_method, and they are all correct.
Therefore, I have deduced that the issue must be with the oauth_signature value. I went through the code in the signature() method, and I cannot find what the problem is. Everything I posted above looks correct. If it is not a problem with the oauth_signature() method, then it has to be an issue in the communication between the consumer and the service...
So, I find myself stuck and frustrated! Any ideas on testing the signature and/or the communcation?
01-22-2010 12:01 AM
In order to test your signature and parameters try Google OAuth Playground (http://googlecodesamples.com/oauth_playground/). Check whether your application is generating the same result, what are different or weird
About the communication I'm not the right person to help you, but try to capture the network traffic (wireshark under windows) and read carefully the Peter_Strange stick thread about Network at our forum.
Integrating third party applications are not easy at all...
01-22-2010 01:27 AM
I've got it! Finally, a response code of "200"
The issue was the hexadecimal values returned from URLUTF8Encoder were lowercase - and Netflix requires that they are uppercase. I simply modified the hex array so that the values were uppercase, and voila...
I cannot thank you enough for sticking with me through this process and providing me with so much help. My girlfriend says that I should send you a fruit basket, haha.
I've still got a big project ahead of me, and I'm sure I'll be posting more - hope to see you again on the forum!
04-05-2010 02:19 AM
i am trying to implement the twitter OAuth but could not succeded. i searched lot for any libraries for OAuth but they are not supported for blackberry. Finally i came across your post as u mentioned u got Oauth worked so please i need ur help.
I have used your code which you have posted on this thread. when i am hitting requestToken() method getting 401(Unauthorized) error code. As i see all the parameters m passing properly but couldnt able to understand where m going wrong.
here is the what i am passing.
If you want i can share my code.
04-06-2010 12:41 AM
It looks like that at least one character is wrong in your header or paramenters' values. Did you check them usiing Google OAuth Playground (http://googlecodesamples.com/oauth_playground/)? Check one by one, otherwise if you are sending something wrong you always will end up facing 401 response code. Pay attention to capital letters, special characters like "+", "/", "\" and so on.
About the code above take care using it! It was just something that I made up pretty quickly just to check the feasability of one project. It's not a producition code, but should have to work!
04-13-2010 03:12 PM
Thanks for ur reply .....
i could not able to reply back due to project deadlines. You are right it was some problem with signature encoding. i fixed it, now my code is working.
Really thanks a lot your code has actually helped me for OAuth implementation.
05-20-2010 01:30 AM
First make sure ur consumerKey and consumerSecret are proper. In URLUTF8Encoder class make the hexadecimal string array to capital letter. Just replace small alphabets into capital. check with this.
06-28-2010 04:02 PM
First I had to change the URL8UTFencoder so that it returns caps lock texts. After that twitter worked.
But what I found that I was not able to publish status updates more than one word. That was also the URLEncoder issue. The URL encoder I was using produced spaces as + not as %20. After changing that twitter worked. It was a very hard nut to find