Bernhard Häussner
Tags: Artikel mit dem Tag «Twitter» durchstöbern

KDE4 Twitter Benachrichtigungen

18.11.2009, 12:29

Da ich gerne das Webinterface von twitter benutze, aber auch gleich wissen will, ob jemand etwas neues getwittert hat, habe ich ein kleines Bash-Script geschrieben, welches eine Meldung aufploppen lässt, sollte jemand einen neuen tweet schreiben.

Es benutzt kdialog, die Meldungen integrieren sich also Problemlos in den KDE-Desktop. Es ist auch recht kurz und einfach.

Einfach herunterladen und in $PATH ablegen. Zum Starten genügt:

nohup twitterNotify.sh &

Da es nicht sonderlich viel Aufwand betreibt, um die XML-Antworten der Twitter-API zu parsen kann nicht zu viel Information übermittelt werden, außer woher die tweets kommen.

Kommentare: keine

Twitter - What am I doing?

27.09.2009, 16:13

Everyone is writing about twitter now, everyone is thinking he's missing things going on at twitter, newspapers report about eyewitnesses tweeting things and twitters user count and press representation is was rapidly growing. So what's that all about? It's about a microblogging service that started in 2006 as a small project of Biz Stone and Evan Williams, who wanted their colleagues to answer the simple question "What are you doing?".

I have been a member of Twitter since March 17, 2007 and have tweeted 439 times since then until now (actually not too many updates). Anyway I mentioned a slight change in how people use twitter. This usage history resulted in a rich variety of uses of twitter. Here are some behaviours I collected "through the years":

The What-are-you-doing-guys

There are some users that nearly only answer THE question when it comes to twitter. You are likely to find mostly tweets like "@having breakfast" or "preparing lunch" in their profiles.

It's really funny to follow one of those What-Are-You-Doing-Guys and then meet her. You won't have anything to say, because you do already know (nearly) everything about your fellow tweople.

Also you do really have a log about all the small things you did in life. This might be very interesting some years later.

The Chatroommates

These tweople that only use twitter like a chat are a bit incompatible to the others. They have evolved in the SMS times, when twitter was THE way to text your friends. You might find many senseless tweets like "ok pals I'm off" or "@yomama sure".

The 140-Excited

Some people seem to not want to tell everyone what they are doing and don't have too many friends on twitter, so they don't really have to use twitter. But everyone does, so do they. This is why they seem to focus on (bad?) jokes, proverbs and short quotes.

The Newsfeedorz

When you have found a stream with only headlines and links or 6 of 7 tweets starting like "new blog post: " you know you have found a Newsfeedor. They use twitter only for posting "news". There are famous ones like CNN and rather not too famous ones. And of course many advertisers have fount their new channel at twitter. The very bad thing about them: It's usually not original content and it's most of the times better available through RSS.

The Readers

This group is a bit underrepresented. Some of them don't even have a twitter account. They are reading through someones profile (subscribing their stream as RSS) or using one of the services that aggregates twitter messages, like delicious.com. Or they use twitter as a real-time opinion-of-the-tweeting-world search engine. I think the twitter makers had a good reason to change their homepage to a mere search page.

The Retweeters and Answerers

A phenomenon at twitter is retweeting. If you want to pull the attention of your readers to a statement of someone else you retweet that (you just tweet it again putting RT @name in front of it). Or you tell everyone your opinion about it (like: opinion (via @name)) or as direct answer (@name blaaa). Now some tweople only do this. If you look through their stream you will find dozens of answers and you don't get what it's all about. This is a true Retweeter/Answerer.

The Trendy

This is by definition a very popular behaviour: Commenting on the trending topics on twitter. Some "answers" are really funny - and of course it's a cool way to share personal experiences. It's a kind of very fast global FB. Just don't overdo it. (And don't just write "#iamsinglebecause it's trendy". )

So what's correct?

As always - nothing. So what do I do? Simple: Mix. I retweeeet what I like or want others to know, I answer questions, I keep a log of some things I did, I stay informed about my friends, and I post stuff I put into the cloud.

You can always find new scenarios where you can use a 140-char-messages-posting-page. For example I have started to collect new/strange/biased/funny (German) words. And sometimes I post cryptic messages. For example this one related to the sense of life, a movie, Alice in Wonderland and the time I arrived at school that day.

And because it's always 140-character limited you can display your twitter status e.g. on your website. I do that through my lifestream. My homeserver that serves as a very neat clock too also shows my twitter status to my family.

Kommentare: keine

Twitter Bookmarklet III

11.07.2009, 20:16

For twitter users: Here's an easy-to-use toolbar button for your browser that substitutes the URL shortening and copy-pasting for you. There's no installation, I don't want to know your twitter login or password, and it will shorten the URL using bit.ly.

The bookmarklet will:

  • Receive a short URL from the bit.ly API
  • Open up your twitter homepage in a new tab (Firefox) or in a pop up with the short URL and the page title included in the textarea
  • (Or take you to the twitter login page, which will then redirect)

To install just drag this link/button into your browser's bookmarks toolbar:

tweet

The bookmarklet is even supporting flickr-Photos (using their short URL like http://flic.kr/p/6qxGR2) and other web sites (Ars technica, PHP-Manual, this blog...) if they provide own shortening services.

The code is a bit inspired by John Resig's „retweet“ button but it's not on the page you are viewing, but in your browser's toolbar, so you don't rely on webmasters cluttering their designs with social bookmarking services' buttons.

For IE-Users: You will have to right-click on the link and choose save bookmark. After that, you will be warned, because it's not a simple link, but a bookmarklet.

Kommentare: 10 Einträge

Shortlinks implementiert

22.05.2009, 20:09

Da mein Domainname doch recht lang zu tippen ist, und sich für twitter sowieso kurze URLs gut eigenen, habe ich jetzt auf dieser Seite die meisten Seiten mit kurz-URLs ausgerüstet. So kann man jetzt z.B. mit meinem ShortURL Auto-Discovery Twitter Bookmarklet ohne Probleme Links auf diese Seite posten und man muss nur noch 1-co.de in die Adressleiste tippen, um auf die Startseite zu kommen.

Die Shortlinks werden auf den entsprechenden Seiten mit dem HTML-Tag <link rel="shortlink" href="http://1-co.de/bj" /> und mit dem HTTP-Header Link: <http://1-co.de/bj>; rel=shortlink ausgewiesen.

Hauptsächlich möglich wird das durch ein paar manuelle Einträge in der .htaccess und durch diese zwei bzw. vier netten Helfer-Funktionen (PHP), die Zahlen (int) in Zeichenfolgen (Strings) umwandeln, wodurch sie rund 20-40% kürzer werden:

function toAlphaNumber($num){
  $anum = '';
  $BASE=62;
  while ($num>=1) {
    $x=$num%$BASE;
    $anum=chr2($x).$anum;
    $num=floor($num/$BASE);
  }
  return $anum;
}
function fromAlphaNumber($str){
  $BASE=62;
  $num=0;
  for ($i=0,$len=strlen($str);$i<$len;$i++) {
    $num+=uchr2($str{$i})*(pow($BASE,($len-1-$i)));
  }
  return $num;
}
function chr2($i) {
  $i+=48;
  if ($i>57) $i+=7;
  if ($i>90) $i+=6;
  if ($i>122) throw new Exception('Too high');
  $c=chr($i);
  return $c;
}
function uchr2($c){
  $i=ord($c);
  if ($i>122) throw new Exception('Too high');
  if ($i>90) $i-=6;
  if ($i>57) $i-=7;
  $i-=48;
  return $i;
}

In der .htaccess:

#manual shortening
RewriteRule ^b$ http://bernhardhaeussner.de/blog [R=301,L]
# [...]

#call a php script that redirects to the right blog post
RewriteRule ^b/([A-Za-z0-9]+)$ blogentry.php?encid=$1 [L]

Jetzt bin ich ja mal gespannt, wie viele Leute meine Posts twittern...

Für Wordpress-User (Update 2009-06-23)

Wer sich mit nichts herum ärgern will und ein ausgereiftes und einfach konfigurierbares Plugin sucht, ist mit dem Plugin Twitter Friendly Links (empfohlen von eins78) gut aufgehoben.

Für Wordpress-User & Bastler (Update 2009-06-20)

Auf Anfrage von eins78 hier noch drei Ticks für Wordpress-Blogs: Theoretisch können auch Worpress-Autoren einfach das Bookmarklet ins HTML-Markup der Seite setzten, es ist ja ein ganz normaler Link. Allerdings funktioniert es nicht ohne Javascript und es gibt folgende elegante Lösung:

Empfehlenswerter und fast genauso einfach ist es, dieses Plugin zu benutzen: Es kümmert sich nicht nur um die Erstellung von kurz-URLs und den entsprechenden Link-Tag im <head>-Bereich: Es erstellt u.a. eine globale Variable $shortlink_url in der die kurze URL gespeichert ist. Dann muss man nur noch im Template-Ordner wp-content/themes/(templatename)/ in der (index.php) folgendes in das Template setzen:

<?php if ( isset($shortlink_url) && $shortlink_url!='' ): ?>
  <a
   href="http://twitter.com/home/?status=check+out+<?php echo $shortlink_url;?>"
   rel="nofollow shortlink"
  >
  tweet this
  </a>
<?php endif; ?>

Ich habe es probeweise im default-Template direkt in das <small> gesetzt, in dem auch Datum und Autor stehen, dann wird es klein unter der Überschrift angezeigt. Die Darstellung des Links lässt sich natürlich noch anpassen. Nachteil an dem Plugin ist, dass die Weiterleitung nicht auf Anhieb funktioniert. Man müsste erst ungefähr so etwas in die .htaccess schreiben:

RewriteRule ^([0-9]+)$ ?p=$1 [R=301,L]

Eine Lösung ganz ohne Plugin hat Thomas Scholz veröffentlicht. Sie „schont die Optionstabelle und erleichtert individuelle Anpassungen“. Allerdings enthalten die Kurzlinks ?p=, weshalb die URLs nicht ganz so schön werden.

Kommentare: 7 Einträge

ShortURL Auto-Discovery Twitter Bookmarklet

07.04.2009, 17:44
Tweet-this-Bookmarklet

Tweet-this-Bookmarklet

Recently I've created a boomarklet to post links quickly to twitter using URL-shortening. The main feature was that you don't have to login on 3rd party web sites because it takes you to twitter. But now there's some more improvement: The new bookmarklet looks for a tiny url on the website itself in a <link rel="short_url"-Tag> (thanks to Snaplog).

To install just drag this link in your bookmark toolbar and you're done:

tweet this

Since there are not too many pages that implement the short_url tag, it falls back to is.gd shortening if it couldn't find one. To test it navigate to a page that offers a short_url for example: http://robert.snaplog.com/:E39/brooklyn_not_ark

Edit 2009-10-22: New Version

The new major version Twitter Bookmarklet III is available.

New in Version 0.9.3.5:

Since the short_url could lead to confusion with URL/URI and has the underscore I've updated the bookmarklet again to support rel="shortlink" too, which seems like a better term. There was of course some discussion.

New in Version 0.9.2:

The bookmarklet has been updated again to allow the short_url keyword to be one of a space separated list. This means it works now on arstechnica.com.

New in Version 0.9.1:

I had to update the bookmaklet to support relative URLs as used by http://www.geograph.org.uk/photo/19. In Javascript element.href returns the full, absolute url like http://e.com/absolute etc. while l.attributes[x].nodeValue may return something like /relative.

Kommentare: 2 Einträge
[ Seite 1 2 ] Nächste Seite »
 
Χρόνογραφ
© 2008-2014 by Bernhard Häussner - Impressum - Login
Kurz-Link zur Homepage: http://1.co.de/