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:
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
1 Response to Testing Twitter for Wordpress using Twitter Updater
Paul
May 15th, 2009 at 7:33 pm
Didn’t know about this plugin, I’ll give it a go.