Tag Archives: twitter

jQuery plugin for Twitter OAuth via popup window (Facebook style)

Disqus and some applications are using Twitter OAuth, but their user flow is not sequential single window process. A child window comes up, then it shows twitter.com and user can click Deny/Allow through that popup. When the user hits the deny or allow button, the popup will be closed immediately and the parent window will […]

Posted in Create | Also tagged , , , | Comments closed

How to Make an Autobot on Twitter with OAuth, not Basic Authentication

Twitter will be shutting off basic authentication on their API on June 30. Tweeting with basic auth was pretty easy in PHP: $context = stream_context_create(array( ‘http’ => array( ‘method’ => ‘POST’, ‘header’ => ‘Content-type: application/x-www-form-urlencoded’, ‘content’ => http_build_query(array(’status’ => $status)), ), )); $response = file_get_contents("http://$username:[email protected]/statuses/update.xml", false, $context); After shut off basic auth, how can we […]

Posted in Tweak | Also tagged , , | Comments closed

Complete working sample for Services_Twitter OAuth in PHP PEAR

You can get some sample codes for Services_Twitter with OAuth from php doc, but it’s not a complete code. I rewrote some parts. % pear install –alldeps Services_Twitter-alpha <?php if (isset($_GET[’clear’])) { // sometimes you need to clear session, just access ?clear=1 session_start(); $_SESSION = array(); session_destroy(); die(’session has been cleared.’); }     define(’CONSUMER_KEY’, […]

Posted in Create | Also tagged , , | Comments closed