I've been having a lot of fun collecting tweets via the XMPP feed (gotta
catch 'em all!), but I've run into an issue lately.
Some of the tweets seem to come through in an abbreviated format. Now,
possibly my toolkit is doing something weird here, but generally
speaking this is the exception, not the rule. Here's an example of a
'good' one:
<message to='my_xm...@my.jabber.server' from='twi...@twitter.com'
id='tag:twitter.com:3937999' type='chat'>
<body>steeph: @frankmeeuwsen ja, ongeveer 15 jaar. En besturen en
jureren en zo. Was mijn lust en leven. Ooit.</body>
<entry xmlns='http://www.w3.org/2005/Atom'>
<source>
<title>Twitter / steeph</title>
<link href='http://twitter.com/steeph'/>
<link rel='self'
href='http://twitter.com/statuses/user_timeline/steeph.atom'
type='application/atom+xml'/>
<author>
<name>steeph</name>
</author>
<icon>http://s3.amazonaws.com/twitter_production/profile_images/25377152/Stephan_klein_normal.jpg</icon>
</source>
<title>steeph: @frankmeeuwsen ja, ongeveer 15 jaar. En besturen en
jureren en zo. Was mijn lust en leven. Ooit.</title>
<summary>steeph: @frankmeeuwsen ja, ongeveer 15 jaar. En besturen en
jureren en zo. Was mijn lust en leven. Ooit.</summary>
<link rel='alternate'
href='http://twitter.com/steeph/statuses/723965922' type='text/html'/>
<id>tag:twitter.com,2008-02-17T22:40:53+00:00:/statuses/723965922</id>
<published>2008-02-17T22:40:53+00:00</published>
<updated>2008-02-17T22:40:53+00:00</updated>
</entry>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items xmlns='http://jabber.org/protocol/pubsub'
node='http://twitter.com/statuses/public_timeline'>
<item
id='tag:twitter.com,2008-02-17T22:40:53+00:00:/statuses/723965922'/>
</items>
</event>
</message>
Here's what I've been seeing lately:
<message to='my_xm...@my.jabber.server' from='twi...@twitter.com'
id='tw_2625461275' type='chat'>
<body>Jambitz: Calzado para geeks http://tinyurl.com/3adsa7</body>
</message>
(ie, the event and entry nodes are missing)
Now obviously I can parse this to get most of the details, but I'd
particularly miss the publish date, among other bits of metadata.
I'll admit this could be something going weird with my libraries
(POE::Filter::XML::Node, POE::Component::Jabber), but I'm intrigued by
the fact that the outer 'id' attribute in the 'message' node is
formatted differently :-) Maybe it's not me.
- Justin