I watch this video (http://www.youtube.com/watch?v=DcUxU9BMyAE) to learn how to post a tweet to Twitter account using PHP. I grab the PHP he give in the video description (http://pastebin.com/3xAuYXVe) & add my Application & Access Token details inside the script.
This is my code (https://gist.github.com/anonymous/11245942).
The github repo for this script is here - https://github.com/abraham/twitteroauth (‘OAuth.php’ and ‘twitteroauth.php’ files inside the ‘twitteroauth’ folder).
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 (http://stackoverflow.com/questions/23263666/post-tweet-to-twitter-not-working), but I got no answer. Please help me.