A Parallel President on Twitter

by Richard Vardit

Over the past 12 years in Argentina, we had two presidents: first Néstor Kirchner for four years, and then his wife Cristina Kirchner for another eight years.  In those past eight years, not one single press conference has been given.  She used Twitter as a one-way propaganda instrument by blocking anyone who was not 100 percent in agreement with her opinion, in a kind of censorship.

By the end of 2014, I discovered that the President had blocked me on Twitter on her official account: @CFKArgentina.  It is as unfair as it sounds: I couldn't see what the president of my country was tweeting, nor reply, retweet, or even quote.  After some research (by that I mean a Twitter search: "@CFKArgentina blocked me"), I found that many more people were in the same situation.

So I decided to create a Twitter account that replicated in real time the same tweets as what the official presidential account was tweeting in order to bypass the restrictions produced by this blocking behavior, which is the closest thing to censorship in a democracy.  The account that solved this problem was called @hosepink.

After a month online, this account received thousands of followers including journalists, economists, artists, and other political parties opposed to the current regime, using it to retweet, quote, and make comments as the tweets were exactly the same tweets as @CFKArgentina without the blocking issue.

The account became a call to freedom of speech on Twitter, even with the knowledge that @hosepink was just a bot.  The users created a parallel community with replies, quotes, and retweets through the tweets of this parallel president.  The growth of the account occurred through user recommendations - one to another.  I could see all kinds of mentions saying things like, "hey bro follow @hosepink if you want to see what Cristina is tweeting," etc.  This also enabled the retweets of journalists and other influential people that had been blocked from the main account to be seen once they were following @hosepink rather than @CFKArgentina.

The new account reflected more honest opinion with each comment, because the users tweeted without fear of being blocked.  It's human nature to embrace such a total freedom of speech.

Now Argentina's ex-president @CFKArgentina is still tweeting to her group, calling for resistance against the current democratic government and blocking retractors, so the account @hosepink is still working online, showing that there is no power greater than knowledge power.

The Next Step

In December of 2015, Cristina Kirchner's populist regime lost the elections after 12 years in power.  The political followers of this government, known as "K," organized themselves into a resistance against the new democratic government.  So the group became even more fanatical.  After reading some tweets and thinking about the rhetoric of their super-devoted political followers, I decided to create a Twitter bot who was actually one of them, using psychological positive reinforcement.

How?  I picked influencers including politicians, journalists, artists, businessmen, and workers' union representatives who were blind followers of Cristina Kirchner.  I picked those who were so deeply involved in corruption cases while they were in government that they couldn't just go away or change their minds.

Now having the influencers list, I created a bot that said exactly the same things they did with minimal changes, just by reading their tweets via a Twitter API and broadcasting them all together in one account called @CFKGate.  After this account had been online for three months, it had gained a couple of thousand followers and was growing every day - over 15,000 daily tweet impressions and 6,000 retweets in the last month alone.

What actually surprised me was that some of the influencers I mentioned before in the list who were responsible for generating all of the content in my account were actually following @CFKGate!  Not only that, but they did likes and retweets of their own created tweets, promoting and interacting with the account @CFKGate as they believed that "I" agreed with them when the reality is that they only agreed with themselves.

At this time, @CFKGate is in constant growth and she has become a successful devoted political follower who is being invited to participate in meetings via direct messages.  The conclusion is that I created a bot who is as smart as a fanatic political follower with just a few kilobytes.

What's next?  Who knows, maybe with some megabytes I might create a Twitter bot as intelligent as a dog.

Here is the mirror bot PHP code:

<?php
/**
  *
  * Reads last tweets since a last posted tweet id, if any, from a twitter account,
  * post those tweets in another selected account, saving last tweet id for the next loop
  * by @rvardit 2014
  * call this script file every 2 minutes for example like this,
  * /2 * * * * wget http://yourdomain.com/tweetmirrorbot.php -O /tmp/a.html
  *
**/

/* Load required lib files.
 * uses twitter oauth/twitteroauth.php
 * https://github.com/abraham/twitteroauth
 */

session_start();
require_once('twitteroauth/twitteroauth.php');
// config.php
// define('CONSUMER_KEY', 'XXXXXXXXXXX');
// define('CONSUMER_SECRET', 'XXXXXXXXXXX');

require_once('config.php');
$dbname = 'twitter';
$screen_name_read = 'hosepink'; // tw account to read tweet from screen_name account
$screen_name_write = 'hosepink'; // tw account to send tweets from
$screen_name = 'CFKArgentina'; // twitter screen_name to search tweets
$debug=0;

// file to get / save last tweet id
$last_tweet_id_file = $screen_name.'_last_tweet_id.txt';
// get last tweet_id from file if nothing
if (file_exists($last_tweet_id_file)) {
  $last_tweet_id = file_get_contents($last_tweet_id_file);
}

echo 'last_tweet_id: '.$last_tweet_id.'<br>';
/* Set user access tokens. */
$access_token['oauth_token'] = 'XXXXXXXXoauth_tokenXXXXXXXX';
$access_token['oauth_token_secret'] = 'XXXXXXXXoauth_token_secretXXXXXXXX';

if ($debug > 1) {
  echo "<hr><h1>access_token</h1><pre>";
  print_r($access_token);
  echo "</pre>";
}

/* Create a TwitterOauth object with consumer/user tokens. */

$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']);

/* If method is set change API call made. Test is called by default. */

$content = $connection->get('account/verify_credentials');
$c = (array)$content;
if ($debug == 1) {
  echo "<hr><h1>TwitterOauth</h1><pre>";
  print_r($c);
  echo "</pre>";
}

// https://dev.twitter.com/rest/reference/get/statuses/user_timeline

$filter = array();
$filter['screen_name'] = $screen_name;
$filter['exclude_replies'] = true;
$filter['include_rts'] = false;
if ($last_tweet_id) {
  $filter['since_id'] = $last_tweet_id; // 567797801678299137; // l ast tweet id from screen name user
  $filter['count'] = 200;
} 
else {
  $filter['count'] = 1;
}

// recall last 200 tweets since last_tweet_id
$content = $connection->get('statuses/user_timeline', $filter);
$c = (array)$content;
$c = array_reverse ($c);
if ($debug == 1) {
  echo "<hr><h1>Last Tweets</h1><pre>";
  print_r($c);
  echo "</pre>";
}

// if there is any content to post then do it
foreach ($c as $key => $value) {
  $v = (array)$value;
  // the original tweet
  echo ($v['text'].'<hr>');
  // $tweettext = '#'.$screen_name.' '.$v['text'];
  $tweettext = $v['text'];
  // do any changes to the tweet text here: replace words, links add/remove words or links
  $tweettext = substr($tweettext, 0, 140);
  // post new Tweet here
  $content = $connection->post('statuses/update', array('status' => $tweettext));
  // delete last id file
  unlink ($last_tweet_id_file);
  // save last_tweet_id to a file
  file_put_contents($last_tweet_id_file, $v['id_str']);
  if ($debug == 0) {
    echo "<hr><h1 >New Tweet</h1><pre>";
    print_r($content);
    echo "</pre>";
  }
}
die;
?>

Code: mirrorbot.php

Return to $2600 Index