Re: Problems with updating profile image

2009-01-17 Thread avon
And here is a vb.net version if anybody needs it Public Sub UploadProfileImage(ByVal photo As Byte(), ByVal username As String, ByVal pwd As String) System.Net.ServicePointManager.Expect100Continue = False Dim request As HttpWebRequest = DirectCast (HttpWebRequest.Create("ht

Re: Problems with updating profile image

2009-01-09 Thread Sean
For any one interested, here is a completed function. public static void UploadProfileImage(byte[] photo, string username, string pwd) { //photo is just a byte array of the image data //A recent change to Twitter's api requires this line to be included for .NET cl

Re: Problems with updating profile image

2008-12-09 Thread Sean
Thanks Lien. I was able to get this figured out. It was a problem with the way I was encoding the image data. I needed to be using iso-8859-1. I really appreciate your help On Dec 8, 5:00 pm, Sean <[EMAIL PROTECTED]> wrote: > Thanks Lien, > > I am trying to get this done using c#.NET and I thi

Re: Problems with updating profile image

2008-12-08 Thread Sean
Thanks Lien, I am trying to get this done using c#.NET and I think I am getting closer. What is happening with my request is it is getting truncated only a few characters in to the actual image data so I don't have a footer boundary. The post completes successfully, but the image that gets uplo

Re: Problems with updating profile image

2008-12-08 Thread Sean
Thanks Lien, I am trying to get this done using c#.NET and I think I am getting closer. What is happening with my request is it is getting truncated only a few characters in to the actual image data so I don't have a footer boundary. The post completes successfully, but the image that gets uplo

Re: Problems with updating profile image

2008-12-08 Thread Lien Tran
Here's what my request body looks like: POST /account/update_profile_image.xml HTTP/1.1 Authorization: Basic Content-Type: multipart/form-data; boundary=-1228771270538 User-Agent: Java/1.6.0_02 Host: twitter.com Accept: text/html, image/gif, image/jpeg, *; q=.2, */*;

Re: Problems with updating profile image

2008-12-08 Thread Sean
Would you mind posting a sample of your correctly formatted request here? I am running windows and haven't been able to get curl up and running yet. Thanks Sean On Dec 8, 12:06 am, Lien Tran <[EMAIL PROTECTED]> wrote: > Thanks Alex.  I used curl to see what the request should look like and >

Re: Problems with updating profile image

2008-12-08 Thread Lien Tran
Thanks Alex. I used curl to see what the request should look like and then coded up my request accordingly. It's working for me now. On Dec 6, 11:37 am, "Alex Payne" <[EMAIL PROTECTED]> wrote: > The test we use for this method is to use curl: > > curl -F '[EMAIL PROTECTED]/to/test/image.jpg' -u

Re: Problems with updating profile image

2008-12-06 Thread Alex Payne
The test we use for this method is to use curl: curl -F '[EMAIL PROTECTED]/to/test/image.jpg' -u USERNAME:PASSWORD http://twitter.com/account/update_profile_image.xml If you use an HTTP proxy, you can see it generating the appropriate request and response. On Sat, Dec 6, 2008 at 00:09, Lien Tra

Problems with updating profile image

2008-12-06 Thread Lien Tran
Hello, I've been trying to update my profile image using the account method update_profile_image. However, the server keeps returning the error "There was a problem with your picture. Probably too big." The photo I am trying to upload is a jpg less than 700 kilobytes in size. Below is the requ