Hi, I'm trying to implement a simple little app which can (a) send status updates and (b) modify the user's profile image.
I started off using Shannon Whitley's code from http://www.voiceoftech.com/swhitley/?p=681 which got me up and running just fine for the statuses/update method. However I needed to add multipart/form-data POST handling to it in order to the account/update_profile_image call. Every example I could find of this involved basic authentication, not OAuth, so I'm not sure if I'm doing it right. Anyway, all I can get from it is "500 Internal Server Error" - does anyone have any ideas? Below it my HTTP request dumped out using Fiddler (I replaced the binary data of the file with "(there's a few K of binary data here, the contents of the file)" and the OAuth keys with X's) POST /account/update_profile_image.xml HTTP/1.1 Content-Type: multipart/form-data; boundary=----------------------------8cbed79c91b24f3 Host: twitter.com Content-Length: 3863 ------------------------------8cbed79c91b24f3 Content-Disposition: form-data; name="oauth_consumer_key"; XXXXXXXXXXXXXXXXXXXXX ------------------------------8cbed79c91b24f3 Content-Disposition: form-data; name="oauth_nonce"; 8684173 ------------------------------8cbed79c91b24f3 Content-Disposition: form-data; name="oauth_signature_method"; HMAC-SHA1 ------------------------------8cbed79c91b24f3 Content-Disposition: form-data; name="oauth_timestamp"; 1250495190 ------------------------------8cbed79c91b24f3 Content-Disposition: form-data; name="oauth_token"; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ------------------------------8cbed79c91b24f3 Content-Disposition: form-data; name="oauth_version"; 1.0 ------------------------------8cbed79c91b24f3 Content-Disposition: form-data; name="oauth_signature"; XXXXXXXXXXXXXXXXXXXXXXXXXXXX ------------------------------8cbed79c91b24f3 Content-Disposition: form-data; name="image"; filename="test.jpg" Content-Type: image/jpeg (there's a few K of binary data here, the contents of the file) ------------------------------8cbed79c91b24f3