Badal
Badal

Reputation: 3807

How to update twitter profile header image using the twitter API?

Twitter has launched new profile design

there is a big header image like facebook cover image

what i want to know is if there is any way i can update user's header image using twitter api??

Upvotes: 1

Views: 1148

Answers (2)

jmandart
jmandart

Reputation: 21

If you look at the Network log while updating your header image in your Twitter account, you will see a call to 'upload_profile_header' went saving the new header image.

Look at the request payload to get the parameters needed.

authenticity_token=...&fileData=...&fileName=...&height=260&offsetLeft=0&offsetTop=0&uploadType=header&width=520.

Theoretically if you were gonna POST to account/upload_profile_header with all the parameters listed above this should be working.

I haven't tested this concept yet and it is just my suggestion.

Let me know how it went

Upvotes: 2

Martin Bean
Martin Bean

Reputation: 39429

There doesn't seem to be from looking at the API documentation, no: https://dev.twitter.com/docs/api/1.1#112

It wouldn't surprise me if they don't either. Facebook don't allow third-party apps to set cover photos as it can lead to apps essentially "hijacking" user profiles for their own promotion gain.

Upvotes: 0

Related Questions