tweeting pipes

…but serious, channels on Twitter are a hot item.

Twitter seem to want branded channels for commerce by using verified accounts to prevent spoofing celebrities, and the same goes for brandnames. There is already a growing trade in twitter accounts like @nike-shoes, @skyeurope.

To build an attractive channel I need credibility, provide regular good quality fresh content, so where do I get that :

Yahoo pipes

I am very lazy and Yahoo have a nice example online, the news aggregator with 14 sources like blogsearch, icerocket, technorati, that you can clone and use out of the box. So I cloned it, replaced the technorati api key and run the pipe with ‘banking’ as keyword. I grab the rss feed url and read that with simplexml (you can use that pipe with any keyword).

Then I take a twitter php api class from sourceforge (it only reads the account, it doesnt have the post-routines), by simon wippich, wire in the rss-feed and start posting content.

require_once('twitter.class.php');
$Twitter = Twitter::getInstance();
$Twitter->setUser('Account','SomePassword');

$rss= simplexml_load_file("http://pipes.yahoo.com/pipes/pipe.run?_id=1234567890&_render=rss&textinput1=banking");

if($rss)
{
    foreach($rss->channel->item as $e)
    {
        $shrunk = file_get_contents('http://bit.ly/api?url='.$e->link); 
        $msg = trim(substr($e->title, 0, (137-strlen($shrunk)))).' '.$shrunk;
        $output = $Twitter->post($msg);
    }
}

neofinance

Now I can post proper stuff.

The second part of a channel is the audience.

Where to get my audience ?

Google Search

Google serp scrapers are always good for 1000 targetted results on any keyword : i use
allinanchor:twitter.com/ site:twitter.com banking
as search phrase, that gets me 95% valid accounts with my keyword banking in the description

$key = 'banking';
//scrape urls
$urls = twt_Google('allinanchor:twitter.com/ site:twitter.com '.$key);
//get the account names
$accounts = twt_Google_getaccounts($urls);

function twt_Google($keywords, $pages=1) {
//scrape results off of google serp    
    $lang='en';
    $results=100;
    for($i=0;$i< $pages;$i++){
        $start = $i*100+1;
        $vargoogleresultpage = "http://www.google.com/search?as_q=".urlencode(trim($keywords))."&num=".$results."&start=".$start."&hl=en&lr=lang_en";
        $googleresponse = join("",file($vargoogleresultpage));
        $googlehits = preg_split('/class=r>

There is my audience, lets make some friends :


for($i=0;$i

hello friends!

Anyways, that's the basic ingredients of a marketing channel, proper content and an audience.