Hi Ramy,

Glad that you reset your credentials -- no problem there now.

At first glance, everything here seems correct. I'm not sure why you are not
getting a response back from our servers. On the computers that you are
executing this code, is there some kind of web proxy you are using that may
be preventing the response from being received?

Does the request fail if you are not using SSL? Have you tried it from
another machine or network?

Taylor Singletary
Developer Advocate, Twitter
http://twitter.com/episod


On Sun, May 23, 2010 at 2:54 PM, ramy <ramy.daghst...@gmail.com> wrote:

> i think i forgot to take out my app credentials from my previous post,
> my app keys have been reset though
>
> On May 22, 6:58 pm, ramy <ramy.daghst...@gmail.com> wrote:
> > Hi, I have a desktop application using libcurl that has "oob" as the
> > call back
> >
> > I am making an Authorization: header and appending all the required
> > items, but when i send my request, i get nothing back - curl just
> > waits for a response from the server for ever, here's a snippet, this
> > is to get a request token btw:
> >
> >         signatureBaseString = getSignatureBaseString();
> >         key = consumerSecret + "&";
> >         signature = format::encrypt(signatureBaseString, key);
> >
> >         basicHeader.push_back("oauth_nonce=\"" + format::encode( noonce,
> > curl ) + "\", ");
> >         basicHeader.push_back("oauth_callback=\"" + format::encode(
> callBack,
> > curl ) + "\", ");
> >         basicHeader.push_back("oauth_signature_method=\"" +
> > format::encode( signatureMethod, curl ) + "\", ");
> >         basicHeader.push_back("oauth_timestamp=\"" +
> > format::encode( timeStamp, curl ) + "\", ");
> >         basicHeader.push_back("oauth_consumer_key=\"" +
> > format::encode( consumerKey, curl ) +"\", ");
> >         basicHeader.push_back("oauth_signature=\"" +
> > format::encode( signature, curl ) + "\", ");
> >         basicHeader.push_back("oauth_version=\"" +
> > format::encode( oauthVersion, curl ) + "\"");
> >
> >         postData = format::vectorToString(basicHeader);
> >         postData = "Authorization: OAuth " + postData;
> >         headers = curl_slist_append(headers, postData.c_str() );
> >
> >         std::cout << "postdata: " << postData << std::endl;
> >
> >         post(headers, requestTokenUrl);
> >
> > postData would look like this (consumer key censored):
> > Authorization: OAuth oauth_nonce="vmhufwrwnjdkaupa",
> > oauth_callback="oob", oauth_signature_method="HMAC-SHA1",
> > oauth_timestamp="1274568595",
> > oauth_consumer_key="XxXXXxxXXxxXXXxxXXx",
> > oauth_signature="v8EdkEk3V3XijCwdsoTIk5x9Z3w%3D", oauth_version="1.0"
> >
> > the post function looks like this
> >
> >         curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
> >         curl_easy_setopt(curl, CURLOPT_CAINFO, "./
> > VeriSignClass3ExtendedValidationSSLCA");
> >         curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);
> >         curl_easy_setopt(curl, CURLOPT_WRITEDATA, &curlapiPageBuffer);
> >         curl_easy_setopt(curl, CURLOPT_POST, 1);
> >         curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
> >         curl_easy_setopt(curl, CURLOPT_COOKIE, curlCookie.c_str() );
> >         curl_easy_setopt(curl, CURLOPT_URL, url.c_str() );
> >
> >         curlResult = curl_easy_perform(curl);
> >         std::cout << curlapiPageBuffer << std::endl;
> >
> > is anyone seeing any mistakes here?
> >
> > thanks
>

Reply via email to