google-code-export / twitcurl

Automatically exported from code.google.com/p/twitcurl
1 stars 1 forks source link

Status update fails when spaces or special symbols are used (Linux) #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I started seeing this issue when porting my small project back over to Linux. 
Timeline and direct message get methods work just fine and OAuth seems to work.

I altered my code to spit out my access_key and access_secret just to verify it 
is pulling them from file correctly and also to print out the status string 
just to make sure it is actually getting the full string from getline(). I also 
modified the twitcurl.cpp code to have it spit out the postUrl, dataStr 
(status), and OAuthHttpHeader to see if they provided any clues. Here is the 
output from a failed status update attempt.

Enter selection: 1
59363265-2Ku8GIJjLYudQK8k6R320cc9hXiPufTcKCLY0BSqz
mRwsY4Fb0a5zXAGAVzeKkh4UIPlmsZ82PRev2nfj98

Status: status containing spaces

status containing spaces
http://api.twitter.com/1/statuses/update.xml
status=status%20containing%20spaces
Authorization: OAuth oauth_consumer_key="",oauth_nonce="1341337397163",oauth_sig
nature="HoGkNlFy3dJbkzGt7VBhOC0IzIw%3D",oauth_signature_method="HMAC-SHA1",oauth
_timestamp="1341337397",oauth_token="59363265-2Ku8GIJjLYudQK8k6R320cc9hXiPufTcKC
LY0BSqz",oauth_version="1.0"

I also used getLastWebResponse() to capture twitter's http response. It is 
attached.

Anyone have any ideas on further debugging steps?

Original issue reported on code.google.com by adam.bev...@gmail.com on 3 Jul 2012 at 5:55

Attachments:

GoogleCodeExporter commented 9 years ago
I also tried getLastCurlError() method and it returned nothing...

So strange that it only fails when you add spaces. Single word status updates 
work fine every time.

Original comment by adam.bev...@gmail.com on 10 Jul 2012 at 3:37

GoogleCodeExporter commented 9 years ago
Reverting to r87 appears to have solved this problem for me. 

Original comment by adam.bev...@gmail.com on 10 Jul 2012 at 9:29

GoogleCodeExporter commented 9 years ago
Yes. New method added in r88 resulted in double urlencoding of status message 
string. Fixed in r99. Thanks :)

Original comment by swatkat....@gmail.com on 21 Jul 2012 at 7:40