Bug with updating background image?


#1

The Twitter background image doesn’t update after calling the account/update_profile_background_image method and getting a successful response. Although, this seems to only happen after you go to the Twitter website and select one of the premade themes and then try to update using the API. Please fix! It is annoying users.


#2

Can someone on the Twitter team confirm this? And maybe let us know when it will be fixed?


#3

You’re right that the account/update_profile_background_image API only works when a user is specifying their own image, rather than using one of the themes from the web profile editor. I’ve also noticed that our docs for this endpoint need some improvement, so I have put that on my todo list!

If the profile background image is blank or is already user-provided, then this should work as expected.


#4

@andypiper Sorry, your response wasn’t clear to me. Are you saying the API can not be used if the user is currently using one of the themes from the web profile editor? Is this a bug? If so, when will it be fixed?


#5

This is not a bug - this is the behaviour of the API, and we haven’t documented it correctly :disappointed_relieved:

I realise that it might be nice if the API did override the value set by the web profile editor, but at the moment it does not work that way. I’ll certainly note this as a potential improvement for the future, and I’ll also get the docs updated to make the behaviour more clear for now.


#6

Hi,

Any news on this?
I found a way of circumventing the issue by making 2 simultaneous calls to the API.

In call #1 POST /1.1/account/update_profile_background_image.json?use=false HTTP/1.1
In call #2 POST /1.1/account/update_profile_background_image.json?use=true HTTP/1.1

In call #1 image gets upload successfully (profile_background_image_url is set wit an URI to uploaded image) and in call #2 we make previously uploaded image active.
Like that I can successfully change the background image per API as we intend.
Can we make the assumption that this is going to work, for the time being?