/** * @param $tweet * @param null $image * @return bool */ public function m_post($tweet, $image = null) { $status = ['status' => substr($tweet, 0, 140)]; if (!$image) { return $this->cb->statuses_update($status); } $status['media[]'] = $image; return $this->cb->statuses_updateWithMedia($status); }