你到底有什么问题?从API的声音来看,您只需要定期将文件上传到Twitter本身。以下内容允许您将文件上载到服务器,并通过
API docs
:
<?php
if( $_POST ) {
// Do anything needed for authentication
$ch = curl_init('http://twitter.com/account/update_profile_background_image.xml');
curl_setopt_array(array(
CURLOPT_POSTFIELDS => array('image' => '@'.$_FILES['myfile']['tmp_name']),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
));
$rsp = curl_exec($ch);
// Read the response
}
?>
<form enctype="multipart/form-data" method="post">
File: <input type="file" name="myfile" />
<input type="submit">
</form>
更多信息可在
PHP documentation
cURL documentation
对于PHP。