 <p>I'd recommend "twitteroauth" library for OAuth on Twitter: <a href="https://github.com/abraham/twitteroauth" rel="nofollow">https://github.com/abraham/twitteroauth</a>. Here is an example code with the twitteroauth library.</p> <pre><code>&lt;?php // Load twitteroauth library. require_once __DIR__ . '/twitteroauth/twitteroauth.php'; // Create a TwitterOAuth object. $oauth = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET); // Post a message. $oauth-&gt;post('statuses/update', array('status' =&gt; "Hello, world!!")); </code></pre> <p>See: <a href="https://github.com/abraham/twitteroauth/blob/master/DOCUMENTATION" rel="nofollow">https://github.com/abraham/twitteroauth/blob/master/DOCUMENTATION</a></p>