Hi yuzhujiutian,

Without knowing more about this OAuth library (and also at a disadvantage of
having very rusty C++ comprehension), I think I'll need to see a signature
base string for this request to understand what may be going wrong. It would
be generated somewhere within the chain of code executed in the
"oauth_http_post"
function you use. Are you able to successfully make GET requests?

Taylor

On Wed, Sep 8, 2010 at 2:38 AM, yuzhujiutian <yuzhujiut...@gmail.com> wrote:

> api documation, the context is ok? while my app tweet error?
>
> http://dev.twitter.com/doc
>
> my code info(oauthlib0.8.9, c++):
>
> char *url_tmp_2 = NULL;
> char *prm_tmp_2 = NULL;
>
>
> rtn_code1 = twit_oaum_access_token(TWIT_CURL_ACCESS_TOKEN_URL,
> TWIT_TEST_USER_CONSUMER_KEY,
> TWIT_TEST_USER_CONSUMER_SECRET,
> request_token_key_grant,
> access_token_secret, direct_token_pin_grant,
> &access_token_key_grant,
> &access_token_secret_grant,
> &access_token_uscreen_name_grant,
> &access_token_user_id_grant);
>
> url_tmp_2 = oauth_sign_url2("http://api.twitter.com/1/statuses/
> update", &prm_tmp_2, OA_HMAC,
>                                                NULL,
> TWIT_TEST_USER_CONSUMER_KEY,
> TWIT_TEST_USER_CONSUMER_SECRET,
>                                                access_token_key_grant,
> access_token_secret_grant);
>
> prm_tmp_2 = xstrcat(prm_tmp_2, "&status=snsetest20100906");
>
> script_tmp_2 = oauth_http_post(url_tmp_2, prm_tmp_2);
> printf("xxxx script_tmp_2 = %s\n", script_tmp_2);
>
> OUTPUT:
> +++++++++++++++++++++++++++++++ tweed message test case 2
>
>
> xxxx url_tmp_2 = http://api.twitter.com/1/statuses/update
> xxxx prm_tmp_2 =
>
> oauth_consumer_key=eYpL3h8P2T3RZ7zNIdiA&oauth_nonce=1F05UTyO2quHzVWwYDvSv&oauth_signature_method=HMAC-
> SHA1&oauth_timestamp=1283937866&oauth_token=172312929-
>
> C4kebETEWK2XWA8dCzoSMRcKMDdnecg3be2EqsTr&oauth_version=1.0&oauth_signature=dTKare5TcqE7WO40cRkB2At4Kv0%3D&status=snsetest20100906
> xxxx script_tmp_2 = <?xml version="1.0" encoding="UTF-8"?>
> <hash>
>  <request>/1/statuses/update</request>
>  <error>Incorrect signature</error>
> </hash>
>
> --
> 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?hl=en
>

-- 
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?hl=en

Reply via email to