oauth twitter posting

I noticed Twitter do not support Basic HTTP Auth but oAuth, so I had a look around at the available libraries and EPITwitter by Jaisen Mathai works fine as replacement for cUrl http auth.

I noticed when testing it with Twitter the whole key set is stored on the dev.twitter subdomain and not in the application directory where you register an application initially. When my first tests failed I think my keys were marked invalid, one working solution is revoking the application access and renewing the keys, then test again and it works. Once it works, it works flawless.

After registering an app at Twitter and getting the keys, it is a nobrainer.


$status = 'some bogus text';

require_once(WP_PLUGIN_DIR . '/myplugin/epitwitter/EpiCurl.php');	
require_once(WP_PLUGIN_DIR . '/myplugin/epitwitter/EpiOAuth.php');
require_once(WP_PLUGIN_DIR . '/myplugin/epitwitter/EpiTwitter.php');
$consumer_key = '';
$consumer_secret = '';
$oauth_token ='';
$oauth_token_secret = '';
$twitterObj = new EpiTwitter($consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret);
$twitterObjUnAuth = new EpiTwitter($consumer_key, $consumer_secret); 
$twitterObjUnAuth->getAuthenticateUrl();
	   //$creds = $twitterObj->get('/account/verify_credentials.json');
$status = $twitterObj->post('/statuses/update.json', array('status' => $status));

Sem

I blogged a post on Hanse Sail 2010 on a new site, and within four minutes it ranked four in Google.

4 minutes

I built the site as demo of what I consider a SEM-blog, designed to score frontpage and get exposure. Added five backlinks, and after three weeks online it is starting to kick ass.

This is a weird video, a whole day hansa sail in 10 minutes, at 2:30 the sail starts.

7search php trends

Cute : these days on 7search the most common searches containing php are openx-ad urls and blocked domain urls.

serp : php failed searches

Several millions.

It seems losely connected to a bh-campaign on facebook installing WinPC Anti-Virus. A lot of it comes from referals to aportals.net and canfind.com containing the same error.

A typo in the openX ad campaign I think, HTTP:/ missing one forward slash, causing the browser to dump the url to Google Search. Which then redirects to the WikiPedia definition of HTTP :).