Hi,

I am using liboauth0.9.4 downloaded from 
http://liboauth.sourceforge.net/index.html
, trying to get the latest
Twitter MENTIONS.

I am following the documents at : http://dev.twitter.com/pages/auth
instructing to tweet a message; for my requirement, i just replaced
the last step ( tweeting a message ) by querying
http://api.twitter.com/1/statuses/mentions.xml

I have successfully done the following 3 steps :

1) Acquiring request token: oauth_token and oauth_token_secret
2) Obtain : oauth_verifier
3) Exchange request token for access token : oauth_token2 and
oauth_token_secret2

but failed at the last step of querying 
http://api.twitter.com/1/statuses/mentions.xml
: I always have "Segmentation fault" on my command line; then I took
the printed requested URL and post parameter to run on Firefox, I
always got "Incorrect signature"

This is my code of the last step :


char mention_uri[ 1024 ] = "http://api.twitter.com/1/statuses/
mentions.xml";
// res_t_key2 and res_t_secret2 were taken at step 3) above

req_url = oauth_sign_url2(mention_uri, &postarg, OA_HMAC, NULL,
req_c_key , req_c_secret, res_t_key2, res_t_secret2);
printf( "\nPOSTARG:%s\n" , postarg ); // ---> work fine
printf("request URL:%s\n\n", req_url); // ----> work fine
reply = oauth_http_post(req_url,postarg);
if (!reply) {
        printf("HTTP request for an oauth request-token failed.\n");
        return 0;
}
printf( "Message len : %d \n"  , strlen( reply ) ); // ---->
Segmentation fault here

if(postarg) free(postarg);
if(req_url) free(req_url);
if(reply) free(reply);

You got any ideas on how to solve this ?

Thanks in advance.

Joshua


-- 
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

Reply via email to