I’m now using Twitter Updater by Victoria Chan

Okay I had to edit the Plugin to get it to work. Here is what I did:

  • Go to your Twitter Updater options, and enter your username in ‘Your Twitter account details’ where it asks you for your email address.
  • Go to edit the file called wp-content/plugins/twitter_updater/twitter_updater.php and find ‘function vc_doTwitterAPIPost’. Change that function entirely to the below.


function vc_doTwitterAPIPost($twit, $twitterURI) {

    //check if user login details have been entered on admin page
    $thisLoginDetails = get_option(’twitterlogin_encrypted’);

    if($thisLoginDetails != ”)
    {
        //this code based on http://www.morethanseven.net/posts/posting-to-twitter-using-php/
        //
        list($username,$password) = split(”:”,base64_decode($thisLoginDetails));
        $url = ‘http://twitter.com/statuses/update.xml’;
        $curl_handle = curl_init();
        curl_setopt($curl_handle, CURLOPT_URL, “$url”);
        curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
        curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl_handle, CURLOPT_POST, 1);
        curl_setopt($curl_handle, CURLOPT_POSTFIELDS, “$twit”);
        curl_setopt($curl_handle, CURLOPT_USERPWD, “$username:$password”);
        $buffer = curl_exec($curl_handle);
        curl_close($curl_handle);
        return ”;
    } else {
        //user has not entered details.. Do nothing? Don’t wanna mess up the post saving..
        return ”;
    }
}

I got the solution from James Cridland’s blog