Posted tweet's content that include emoji contains unnecessary characters


I want to post a tweet that include emoji(:arrow_right:) by RESTAPI.

so I post a tweet as below by using PHP’s library .

$tweetContent = "@xxxxxx
【 TwitterTrend 】

$replyObject = [
            "status" => $tweetContent,
            "in_reply_to_status_id" => "xxxxxxxxxxxxxxxxxxxx",
            "attachment_url" => "" . $tweetInfo->user->screen_name . "/status/" . $tweetInfo->id

$this->connection->post("statuses/update", $replyObject);

But this created tweet by RESTAPI is as below.

【 TwitterTrend 】

What I wondered was that there is h between :arrow_right: and also 's h

I want eliminate these h. so Please tell me the way.


I’m not familiar with PHP so I can’t directly help you on this.

Have you tried posting the Tweet using any other methods?
For example, using curl or twurl?

curl --request POST
–url ‘
–header ‘authorization: OAuth oauth_consumer_key=“XXXXXX”, oauth_nonce=“YYYYYY”, oauth_signature=“ZZZZZZ”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“WWWW”, oauth_token=“VVVVVV”, oauth_version=“1.0”’