Profile image uploads not working (using twitter-async)

225 views
Skip to first unread message

Roy Tanck

unread,
Jun 15, 2010, 10:00:49 AM6/15/10
to Twitter Development Talk
I'm trying to upload profile images using oAuth. This basically works
(I get the right return data, no errors), except that the image is not
updated. Sending tweets through the same library does work, so this
probably isn't an authentication issue.

As per the twitter-async documentation, I'm using:

$twitterObj->post('/account/update_profile_image.json', array('@image'
=> '@'.$img_path));

$img_path is the correct path (+filename) for the file, I've checked
the folder name using phpinfo, used a test image, etc.

Since I'm not getting errors, this issue is very hard to troubleshoot
from my end. Suggestions on how to tackle this very welcome.

(More info on twitter-async is here: http://github.com/jmathai/twitter-async
, on sending images here http://wiki.github.com/jmathai/twitter-async/#multipart)

Taylor Singletary

unread,
Jun 15, 2010, 11:12:53 AM6/15/10
to twitter-deve...@googlegroups.com
The image upload facilities at Twitter are in need of some love (and are being worked on!) -- they'll often throw a 500 error and actually update the image, or show a 500 error and not update the image.. it should, in general, function better and more reliably in the near future.  The current site issues make it sometimes difficult to have clarity on how something failed, and at what stage.

Taylor Singletary
Developer Advocate, Twitter
http://twitter.com/episod

Jaanus

unread,
Jul 15, 2010, 1:35:49 AM7/15/10
to Twitter Development Talk
I have a similar problem. I am trying to upload a profile image with
the API with OAuth authentication. I get a 200 response and a valid
response body, indicating a path like
http://a1.twimg.com/profile_images/1078800125/myProfileImage_normal.jpg
in the response for the uploaded image. However, when I try to access
this URL, I get HTTP 403 Forbidden. Is this expected in the current
state of things, or is the problem on my client side?


J


On Jun 15, 8:12 am, Taylor Singletary <taylorsinglet...@twitter.com>
wrote:
> The image upload facilities at Twitter are in need of some love (and are
> being worked on!) -- they'll often throw a 500 error and actually update the
> image, or show a 500 error and not update the image.. it should, in general,
> function better and more reliably in the near future.  The current site
> issues make it sometimes difficult to have clarity on how something failed,
> and at what stage.
>
> Taylor Singletary
> Developer Advocate, Twitterhttp://twitter.com/episod

Bob

unread,
Jul 15, 2010, 4:16:21 AM7/15/10
to Twitter Development Talk
We've been experiencing this issue since yesterday see:

http://groups.google.com/group/twitter-development-talk/browse_thread/thread/bd560e9866081639

And:

http://code.google.com/p/twitter-api/issues/detail?id=1745

For more info.

Looks like they just fixed it for new uploads but any uploads made
during the period are still broken. Not sure if they will be able to
fix that aspect or not (although it does look like the image is there
in Amazon S3, just that the permissions on it are wrong).

Thanks,

Bob

Founder
Twibbon.com

On Jul 15, 6:35 am, Jaanus <jaa...@gmail.com> wrote:
> I have a similar problem. I am trying to upload a profile image with
> the API with OAuth authentication. I get a 200 response and a valid
> response body, indicating a path likehttp://a1.twimg.com/profile_images/1078800125/myProfileImage_normal.jpg

3DTOPO

unread,
Jul 15, 2010, 2:28:13 AM7/15/10
to Twitter Development Talk

I am having the same issue as well.

I took a look at the page source for my test profile, copied the URI
and pasted it a web browser. In Safari it gives me a broken image
icon, in Firefox it says:

The image “http://a3.twimg.com/profile_images/1078824623/
img_normal.png” cannot be displayed, because it contains errors.

I downloaded the image using curl and the contents of the PNG is
actually XML! With an error code "AccessDenied":

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</
Message><RequestId>3B8A35B427C2CFA3</RequestId><HostId>SfeZ
+c4cndtXGQucKuGtYvKrtteoLapRJojZEW9nWae20FMOy2IA/D7jeZowOKMh</HostId></
Error>

The plot thickens?

Matt Harris

unread,
Jul 15, 2010, 11:02:24 AM7/15/10
to twitter-deve...@googlegroups.com
Just wanted to say the image uploading should now be fixed but any broken images will need to be uploaded again. The error you are seeing coming from the servers is the standard response returned when a file is not found. The access denied message is because nothing was found at the URL and there isn't an index pages to fall back to.

If you're still getting 200 OK but broken images please leave a comment on the issue tracker: http://code.google.com/p/twitter-api/issues/detail?id=1745

Best,
Matt
--


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris
Reply all
Reply to author
Forward
0 new messages