I watch this video (PHP oAuth Twitter API - Send a Message - YouTube) to learn how to post a tweet to Twitter account using PHP. I grab the PHP he give in the video description (Twitter API PHP - Pastebin.com) & add my Application & Access Token details inside the script.
This is my code (gist:11245942 · GitHub).
The github repo for this script is here - GitHub - abraham/twitteroauth: The most popular PHP library for use with the Twitter OAuth REST API. (‘OAuth.php’ and ‘twitteroauth.php’ files inside the ‘twitteroauth’ folder).
MY PROBLEM
When I run my code with localhost (using MAMP), the tweet successfully sent to my Twitter account.
But, when I put it on my web hosting account and run the code, the tweet not sent to my Twitter account even I still get the success message like below.

How to fix this problem? Why the tweet is not sent and only sent successfully in localhost mode?
This is my Application & Token Access details (it’s same like in my code):

I also have asked this on Stack Overflow (php - Post Tweet to Twitter Not Working - Stack Overflow), but I got no answer. Please help me.