public function Twitter::statuses_update_with_media in Twitter 6.5
Same name and namespace in other branches
- 7.6 twitter.lib.php \Twitter::statuses_update_with_media()
- 7.5 twitter.lib.php \Twitter::statuses_update_with_media()
Creates a Tweet with a picture attached.
Parameters
string $status: The text of the status update (the tweet).
array $media: An array of physical paths of images.
array $params: an array of parameters.
See also
https://dev.twitter.com/docs/api/1.1/post/statuses/update_with_media
File
- ./
twitter.lib.php, line 408 - Integration layer to communicate with the Twitter REST API 1.1. https://dev.twitter.com/docs/api/1.1
Class
- Primary Twitter API implementation class
Code
public function statuses_update_with_media($status, $media, $params = array()) {
$params['status'] = $status;
$params['media[]'] = '@{' . implode(',', $media) . '}';
$values = $this
->call('statuses/statuses/update_with_media', $params, 'POST');
// @TODO support media at TwitterStatus class.
return new TwitterStatus($values);
}