Hi taylor

I'm executing the code on my everyday laptop connected at home, that
is to say, behind a basic connection that's coming through a router,
no fancy proxy business.

I have not tried this on other networks or on other computers, but
will give both those alternatives a try tonight.

I ran the code again without SSL and the result is the same except
without the SSL stuff on top, printed bellow:

== Info: About to connect() to api.twitter.com port 80 (#0)
== Info:   Trying 168.143.162.109... == Info: connected
== Info: Connected to api.twitter.com (168.143.162.109) port 80 (#0)
=> Send header, 426 bytes (0x1aa)
0000: POST /oauth/request_token HTTP/1.1
0024: Host: api.twitter.com
003b: Accept: */*
0048: Cookie: ./cookies.txt
005f: Authorization: OAuth oauth_nonce="edvkkfxiqqwdufit", oauth_callb
009f: ack="oob", oauth_signature_method="HMAC-SHA1", oauth_timestamp="
00df: 1274715540", oauth_consumer_key="XxXXxxxxxXXXxxXXXXXxx", oauth_
011f: signature="0n1MR4hg%2Fv%2FXv5r1XprkUY209F8%3D", oauth_version="1
015f: .0"
0164: Content-Length: 0
0177: Content-Type: application/x-www-form-urlencoded
01a8:

formatting is probably going to chew it up again, here it is for ease
of sight http://codepad.org/0SwNSw4a

by the way, just to clarify, this is the debug output from curl's C
library, libcurl.


On May 24, 11:20 am, Taylor Singletary <taylorsinglet...@twitter.com>
wrote:
> 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, Twitterhttp://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