From ece2d60a49850c34d45075788aa8bc4740ef2b30 Mon Sep 17 00:00:00 2001 From: J7mbo Date: Mon, 17 Jun 2013 12:47:13 +0100 Subject: [PATCH] Fix for tweets starting with @ character --- TwitterAPIExchange.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TwitterAPIExchange.php b/TwitterAPIExchange.php index 7b4d98d..85f9dc3 100755 --- a/TwitterAPIExchange.php +++ b/TwitterAPIExchange.php @@ -65,6 +65,11 @@ public function setPostfields(array $array) throw new Exception('You can only choose get OR post fields.'); } + if (isset($array['status']) && substr($array['status'], 0, 1) === '@') + { + $array['status'] = sprintf(" %s", $array['status']); + } + $this->postfields = $array; return $this;