OAuth doesn't work - need to send tweets from my website - please help


I spent over 6 hours for trying to add the ability to post on twitter from my website using the OAuth system.

The simple code that I used goes like this:

require_once ‘./lib/twitteroauth/twitteroauth.php’;

define(“CONSUMER_KEY”, “XXX”);
define(“OAUTH_TOKEN”, “XXX”);
define(“OAUTH_SECRET”, “XXX”);

$text = ‘Using Abrahms Twitter OAuth library – and loving it!’;


$tweet->post(‘statuses/update.json’, array(‘status’ => $text));

When I run the PHP file, nothing happens, I mean the code does doing something, but I don’t see the twiit on my wall.

First of all, everything I tried to find on google or twitter blogs was pretty out of date. The most frehs topic was like the end of 2011 or the begining of 2012.
I have no idea if “‘statuses/update.json’” is correct like, and I have no idea how make it work.

If someone knows an alternative solution or how to fix it, please let me know.



Check from the settings of your Twitter application, whether the OauthToken and OauthSecret are the same as that you are using in your code.


No i have use different key but this code not working any other code please share