Tag Archives: Twitter

The Wobbly World of Corporate Tweeting

Update: Please see the bottom of this post for the latest.

I am feeling spurned.  I used to follow my local news station, Central Florida News 13, on Twitter.  A few days ago, I realized that I wasn’t seeing their tweets anymore.  Anyone who knows Twitter knows that its performance has been a huge pile of suck lately, so I figured it was one of those Twitter bugs.  I went to their page and it was full of garbage: pages and pages of the same nonsense message.  Had they been hacked? Caught that Twitter worm?I tried to follow them about 5 times, but it wouldn’t let me.  Broken Twitter.  Nothing new.

Today I saw that they had posted a new update because someone re-tweeted it.  So I navigated over to their page and found that they had protected their updates.  I hit the button to  request to follow them, only to be greeted with the following:

Blocked!

What the eff? They blocked me? Why? Why would they block me?

So let me ask: in what case does it make sense for a corporation or business to block a normal user.  I must say, I am pretty upset, upset enough that I am seriously thinking that I won’t be watching channel 13, which I normally watch almost every single day, anymore. If they will single me out as someone who can no longer enjoy their service, why would I be a patron in front of my TV?

This is probably trivial and I should ignore it, but instead, I’m going to blog my new-found hatred for Central Florida News 13 and their Twitter team. Boooooooo!

Bitch, Please!

So, knowing that doing so has lost them a viewer, does that make the world of Twitter a little scarier? Would people stop listening to a band, watching an actor, reading an author, if they expressed a feeling or idea with which the reader didn’t agree? Would companies feel that Twitter is safe ground knowing that tweeting the wrong thing or blocking a user could result in loss of business or audience?

Update, 4/20/09: Turns out it was – unsurprisingly – a Twitter error. I got a DM and a tweet from them, and they followed me. I can’t understand why Twitter can’t seem to get their crap together. You KNOW they aren’t getting as much traffic as Facebook. With $55 million+ in the bank, you’d think they could build the right infrastructure.

Tagged , ,

Damn It, Twitter!

FAIL WHALE

All goddamned day I’ve been getting this goddamned whale on Twitter. I’ve also been trying to change the background of my stream, but although it always reports successful (when it doesn’t fail due to capacity problems), it never changes. It either replaces my background with nothing, or it uses the background I had three or four changes ago. God damn it, Twitter, get your goddamned act together!

Tagged , , , ,

A Beginner’s Guide to Twitter

Suddenly, I find myself kind of addicted to Twitter. Unlike a website, RSS, or even Facebook, it really caters to the ADD side of me in an amazing way. However, Twitter can be a little confusing at first, so this is a very basic primer for the uninitiated. Read on for much more. 

Continue reading

Tagged , ,

How to Add Latest Tweet to WordPress (Without a Plugin)

I decided to add my latest “tweet” from Twitter to the sidebar of my WordPress blog. Rather than use yet another plugin that adds yet another hook – and there are many that do this with lots of code, I decided to use a homegrown solution, dependant only on PHP4+ and cURL  (most webhosts already have cURL compiled in, if not, you should request it).  Adding the following to any of the files in your WordPress theme will print out your current Twitter status and cache the results so you don’t hammer their system.

First, snag your Twitter user id.  Then, open up your theme file.  I put mine in sidebar.php found in /wp-content/themes/<THEMENAME>/.    Use the below code.  If you want the output wrapped in a list, you would need to put <ul> and <li> tags around this code.

Carefully set your variables.  The cache file should be writable.  Note that you can use a decimal value for $tw_BlankAfter and $tw_Minutes if necessary.   That’s it.

Due to what must be a bug in WordPress, please ignore the closing “</text></created_at>” at the end of this post.  It’s trying be smart and “fix” broken tags, but the code is right.

NOTE (2/20/09): I have updated the below code.  The new version can be found at “Posting Your Latest Tweet in WordPress“.

/* ~~~~ Custom Twitter Bit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~ Adam S, firsttube.com, twitter @sethadam1 ~~~~~~~~~~~~~~~~~~~~ */
 
$tw_File = '/path/to/a/static/writable/file/twitter.html';
$tw_Userid='XXXXXXX'; //set to your Twitter user id
$tw_BlankAfter = 30; //blank out status if it's older than this many days
$tw_Minutes = 10; //minutes between reloads
 
$tw_Offset = FALSE; //leave as is
// uncomment below time if you want to allow a manual reset via ?twitter-reset
// if($_SERVER['QUERY_STRING']=='twitter-reset') { $tw_Offset=0; } 
 
/* Do not edit below this line */
if(filemtime($tw_File)&gt;time()-floatval($tw_Offset)) {
	include $tw_File;
} else {
	if(is_writable($tw_File)) { $tw_iswritable=1; }
	$tw_time = (86400*floatval($tw_BlankAfter));
	if($tw_Offset) { $tw_time=$tw_Offset; }
	$tw_hyperlinks = true;
	$tw_c = curl_init();
	curl_setopt($tw_c, CURLOPT_URL,
		"http://twitter.com/statuses/user_timeline/"
		.intval($tw_Userid).".xml");
	curl_setopt($tw_c, CURLOPT_RETURNTRANSFER, 1);
	$tw_src = curl_exec($tw_c);
	curl_close($tw_c);
	preg_match('/(.*)&lt; \/created_at&gt;/', $tw_src, $tw_d);
	if(strtotime($tw_d[1]) &gt; time()-$tw_time) {
		preg_match('/(.*)&lt; \/text&gt;/', $tw_src, $tw_m);
		$tw_status = htmlentities(str_replace("&amp;","&amp;",$tw_m[1]));
		if( $tw_hyperlinks ) {
			$tw_status = ereg_replace(
			"[[:alpha:]]+://[^&lt;&gt;[:space:]]+[[:alnum:]/]",
			"<a href="\">\\0</a>",
			$tw_status);
		}
		$tw_output = $tw_status;
	} else {
		if($tw_iswritable==1) {file_put_contents($tw_File,''); }
	} 
 
	if($tw_iswritable==1) { file_put_contents($tw_File,$tw_output); }
	echo $tw_output;
}
/* ~~~ /Custom Twitter Bit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

Please note that portions of this code come from the twtter_status() function that was not written by me, but is available from various sources online.

Update: Removed function and put code inline.

Tagged , , ,