php - TwitterAPI account/update_profile_background_image not works -


i'm using abraham's php library connect twitter api. im trying update background profile, after authentication doing following:

$oauth = new twitteroauth($this->tw_key, $this->tw_secret, $this->tw_current_accesstoken, $this->tw_current_accesssecret); $oauth->host = $this->tw_host; $result = $oauth->post('account/update_profile_background_image', array('image' => base64_encode(file_get_contents($image_full_path)))); 

path image correct.
can verify_credentials perfectly, auth not problem.
returns json coded array, fine, background image param not changing.
if i'm doing using array('image' => '@'.$image_full_path) gives 131 internal error, maybe because abraham's library not support multipart image uploads.

all other methods, account/update_profile_image working fine.
ideas? thanks.

there size-limit, both in dimension , file size. make sure image <800kb , smaller 2048px @ largest side.

the background image profile, base64-encoded. must valid gif, jpg, or png image of less 800 kilobytes in size. images width larger 2048 pixels forcibly scaled down. image must provided raw multipart data, not url.

https://dev.twitter.com/rest/reference/post/account/update_profile_background_image


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -