Re:[twitter-dev] Re: XAuth authentication fail on Chinese machine

2010-11-04 Thread engine.start
Have you test your singnatrue by the way http://quonos.nl/oauthTester support ? 
(not only the base)
And have you captured your request ? Maybe youshould do this job first, and 
then again on a non-chinesemachine,
you will get the answer.





At 2010-11-04 16:20:05,pawan  wrote:

>Hi,
>
>Thanx for reply but still in reply I got same problem (The remote
>server returned an error: (401) Unauthorized.). I add  this line in my
>web request webRequest.Headers.Add("Accept-Language: zh-CN,en,*");
>But no sucess.
>:(
>
>On Nov 3, 11:03 am, "engine.start" <477914...@163.com> wrote:
>> Hi,
>> Your problem maybe same as mine.
>>
>> chang url to another website, do not use ssl, wireshark your request, and 
>> then compare with this, maybe it will work.
>> (I use libcurl, and add "User-Agent: Mozilla/5.0" to httpheader, and it work)
>>
>> POST ?x_auth_username=###&x_auth_password=&x_auth_mode=client_auth 
>> HTTP/1.1
>> Authorization: OAuth 
>> oauth_consumer_key="#",oauth_signature_method="HMAC-SHA1",oauth_signature="",oauth_timestamp="1288593077",oauth_nonce="9TPwvl28NeTtKLZH",oauth_version="1.0"
>> Content-Length: 0
>> Connection: Keep-Alive
>> Accept-Encoding: gzip
>> Accept-Language: zh-CN,en,*
>> User-Agent: Mozilla/5.0
>> Host:www.XX.com
>>
>> Content-Type: application/x-www-form-urlencoded
>>
>> At 2010-11-03 13:18:16,pawan  wrote:
>>
>> >Thanks for reply but after using thishttp://quonos.nl/oauthTesterURL
>> >I got my base string is ok and still I not able to find out how to
>> >resolve this issue.
>>
>> >On Nov 2, 12:32 am, Tom van der Woerdt  wrote:
>> >> Hi,
>>
>> >> Most 401 Unauthorized errors (and especially the ones involving UTF8
>> >> characters) are because of errors in the Base String, used to generate
>> >> the signature.
>>
>> >> Please use the validation tool at , it may
>> >> help you a lot with validating your Base String. As access_token always
>> >> involves usernames and passwords, please do substitute them with dummy
>> >> ones for security reasons - just make sure that they at least look like
>> >> the previous ones, because otherwise it would be hard to detect encoding
>> >> issues.
>>
>> >> Tom
>>
>> >> PS: When dealing with encoding issues, XX'ing the values really
>> >> doesn't help.
>>
>> >> On 11/1/10 6:58 PM, pawan wrote:
>>
>> >> > Hi,
>>
>> >> > We have created a Desktop Twitter application, In this application I
>> >> > have usedXAuthfeature to get data from "Twitter API". It works fine
>> >> > on Win 7 Ultimatemachine. However when I run my application's exe on
>> >> > core "Chinese" Win 7machine, I got "The remote server returned an
>> >> > error: (401) Unauthorized." error from following request:
>>
>> >> >https://api.twitter.com/oauth/access_token?oauth_consumer_key=XXX...
>>
>> >> > Can anyone help me out to know how to resolve this issue.
>>
>> >> > Thanks,
>> >> > Pawan
>>
>> >--
>> >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 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 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


Re:[twitter-dev] Re: XAuth authentication fail on Chinese machine

2010-11-02 Thread engine.start
Hi,
Your problem maybe same as mine.

chang url to another website, do not use ssl, wireshark your request, and then 
compare with this, maybe it will work.
(I use libcurl, and add "User-Agent: Mozilla/5.0" to httpheader, and it work)

POST ?x_auth_username=###&x_auth_password=&x_auth_mode=client_auth 
HTTP/1.1
Authorization: OAuth 
oauth_consumer_key="#",oauth_signature_method="HMAC-SHA1",oauth_signature="",oauth_timestamp="1288593077",oauth_nonce="9TPwvl28NeTtKLZH",oauth_version="1.0"
Content-Length: 0
Connection: Keep-Alive
Accept-Encoding: gzip
Accept-Language: zh-CN,en,*
User-Agent: Mozilla/5.0
Host: www.XX.com


Content-Type: application/x-www-form-urlencoded




At 2010-11-03 13:18:16,pawan  wrote:

>Thanks for reply but after using this http://quonos.nl/oauthTester URL
>I got my base string is ok and still I not able to find out how to
>resolve this issue.
>
>On Nov 2, 12:32 am, Tom van der Woerdt  wrote:
>> Hi,
>>
>> Most 401 Unauthorized errors (and especially the ones involving UTF8
>> characters) are because of errors in the Base String, used to generate
>> the signature.
>>
>> Please use the validation tool at , it may
>> help you a lot with validating your Base String. As access_token always
>> involves usernames and passwords, please do substitute them with dummy
>> ones for security reasons - just make sure that they at least look like
>> the previous ones, because otherwise it would be hard to detect encoding
>> issues.
>>
>> Tom
>>
>> PS: When dealing with encoding issues, XX'ing the values really
>> doesn't help.
>>
>> On 11/1/10 6:58 PM, pawan wrote:
>>
>> > Hi,
>>
>> > We have created a Desktop Twitter application, In this application I
>> > have usedXAuthfeature to get data from "Twitter API". It works fine
>> > on Win 7 Ultimatemachine. However when I run my application's exe on
>> > core "Chinese" Win 7machine, I got "The remote server returned an
>> > error: (401) Unauthorized." error from following request:
>>
>> >https://api.twitter.com/oauth/access_token?oauth_consumer_key=XXX...
>>
>> > Can anyone help me out to know how to resolve this issue.
>>
>> > Thanks,
>> > Pawan
>
>-- 
>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 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