Hi,

This seems more like a question for the Authentication APIs group:
http://groups.google.com/group/Google-Accounts-API

To quickly answer your question...I would expect all of your
parameters
to be correct (base string, signature, and oauth_*) if you are able to
get
an access token.

- Is this the same code that acquired the token?
- Also, I don't see where you are setting url_data.
- What is the exact error?

Eric

On Nov 10, 7:05 am, K_Reverter <[EMAIL PROTECTED]> wrote:
> I try to use Google contacts API,The feed url is:
>
> http://www.google.com/m8/feeds/contacts/default/thin?max-results=1
>
> I follow the document athttp://code.google.com/apis/accounts/docs/OAuth.html
>
> I success get a AccessToken at Step.8
>
> However ,I failed to get resonse data at Step.9 and Step.10
>
> I use C# OAuthBase.js (http://code.google.com/p/oauth/source/browse/
> code/csharp)
>
> and my main source code like bellow:
>
>         public static XmlDocument getData(string atoken, string
> atoken_secret)
>         {
>             string nUrl, nParams;
>             string nonce=oab.GenerateNonce();
>             string timestamp=oab.GenerateTimeStamp();
>             string signature = oab.GenerateSignature(new
> Uri(url_data), consumer_key, consumer_secret, atoken, atoken_secret,
> "GET",timestamp , nonce, out nUrl, out nParams);
>             HttpWebRequest request =
> (HttpWebRequest)WebRequest.Create(new Uri(url_data));
>             request.Headers.Add("Authorization", "OAuth oauth_token="
> + oab.UrlEncode(atoken) + "\", oauth_signature_method=\"HMAC-SHA1\",
> oauth_signature=\"" + oab.UrlEncode(signature) + "\",
> oauth_consumer_key=\"" + oab.UrlEncode(consumer_key) + "\",
> oauth_timestamp=\"" + oab.UrlEncode(timestamp) + "\", oauth_nonce=\""
> + oab.UrlEncode(nonce) + "\", oauth_version=\"1.0\"");
>             request.Method = "GET";
>             HttpWebResponse response = request.GetResponse();
>             XmlDocument doc = new XmlDocument();
>             doc.Load(response.GetResponseStream());
>             return doc;
>         }
>
> I carefully checked the input parameters and all are right.
>
> Who can help me?
>
> Thank you very much!!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Data Protocol" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to