Hey all,

I'm trying to change background image on the fly using an OAuth
application, but running into some strange problems. Firstly, I should
add that I can perform other requests (such as tweets and follows)
without issue. I'm using abraham's twitterOAuth library.

1. When trying to post an image, in what format do I need the image?
I'm not using a form to upload the image, but rather using PHP code to
grab it remotely using fsockopen(). This seems to grab the raw image
data, so I assume I'm doing things right up to this point.

2. My base_string seems to have the proper 3 parts, as follows:
print_r($parts):
array
(
    [0] => POST
    [1] => https://twitter.com/account/update_profile_background_image.xml
    [2] => image=GIF89a%5E%01%07%01%F7....etc etc
)
However, when the script implodes the three parts using an ampersand
as the glue string, my variable name 'image' seems to be morphed into
some strange ASCII character. To be exact, the imploded string should
be "...background_image.xml&image%3D...." but it is instead turned
into "...background_image.xmlℑ%3D..."

It appears to be morphed into the entity on this page (http://
htmlhelp.com/reference/html40/entities/symbols.html), but I have no
idea how to work around that, since it seems to be done automatically
in PHP.

3. Even after I work around that issue, I'm receiving an Incorrect
Signature error on the entire image change request. Are there any
other things that need to be fixed for image uploads to work
properly?

Thanks in advance, I can provide code or other details upon request!

Reply via email to