Posts Tagged ‘Twitter

15
Oct
09

“Hacking your own Twitter widget” for beginners

In the last few days I received 2 questions about how to get a Twitter widget on your site to display some data other than a user timeline. Since I love writing stuff I know that people like instead of what I think they will like, I’m going to write a short howto on getting your custom widget.

Getting your user timeline in a widget is easy; Go to Twitter and grab the code from this page: http://twitter.com/widgets/html_widget

If you look at the code you’ll see a link like this http://twitter.com/statuses/user_timeline/pepijndevos.json?callback=twitterCallback2&count=5 Go ahead and click it! It’s a JSON file with my latest tweets.

The cool part is that Twitter has a whole API of urls you can use to get your data. The default widget is using statuses/user_timeline. Note the XML structure at the bottom. We can replace this url with any public url that returns the same structure, that means statuses containing a user, not users containing a status.

Here is a list of a few API calls you could use:

An example using my favorites would look like:

<div id="twitter_div">
<h2>Twitter Updates</h2>
<ul id="twitter_update_list">
</ul>
<a href="http://twitter.com/pepijndevos" id="twitter-link" style="display:block;text-align:right;">follow me on Twitter</a>
</div>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/favorites/pepijndevos.json?callback=twitterCallback2&count=5"></script>

You can now paste this html code anywhere you want it to appear!

30
Jul
09

Get the overview on what is happening on Twitter visually!

example

Now available as a web service!

Have you lost who is saying what to who? Do you think one image(graph) says more than a thousand words(tweets)? Are you tired of clicking back and forth to see conversations?

I’ve made a new Twitter solutions that shows all your tweets and your friends tweets in one graph. It connects your tweets to the people you @refer to and to #tags!

To try this great application download it from my Box.net widget as usual. The usage is:

$ python tweetograph.py USERNAME:PASSWORD[ dot|neato|twopi|circo|fdp]

Requires Python-Twitter and PyDot to run. You can optionally specify the Graphviz tool you want to use for layout(default is dot), see Wikipedia.

Known bugs:

  • Dot is really picky on characters entered, so currently some characters get stripped

Update: Now it even draws dotted lines from ReTweets to their original, so you can actually see where that RT came from!

Update: here is a PDF of my network, so you can see how it works: bobdebvlinder(rendered using neato)

Update: Replies now get a dashed line between them so you can really follow conversations!

27
Jul
09

Twitter mindmap

I’ve never used Twitter before, I considered it useless. But today I registered at Twitter.com, only to surf straight to their API page to realize my new idea.

Those of you familiar with the concept of mindmaps know that they can visualize information which normally would need pages in one single image. Wouldn’t it be great if you could see your network and messages as a network/mindmap? It IS a network after all. 😉

What I made is a mere proof of concept. It fetches some friends and messages from Twitter and shows them at a random place connected with black lines to their author, @friends and #tags. Clicking on a friend shows their network. All objects ar draggable, thanks to jQuery(the image below is slightly ordered 😀 ).

I’ve got no place to put this except for here, so I can only give you an image and a zip file(Box widget over there >>> ), no live example.

Mindmap




My blog has moved!

My blog has permanently moved to a self hosted Wordpress at http://pepijndevos.nl

This blog will stay around for accidental search engine visitors.

Me

This is me

Blog Stats

  • 22,233 hits

@PepijnDeVos