Posts tagged: xml

Working with the Twitter API in C++

Recently I’ve been playing the Twitter API through C++. I read through the Getting Started Guide and discovered that I had cURL installed on my system. It was so easy to grab my profile that I couldn’t resist having a play around to see if I could get timelines and update my status.

cURL has a an API available for a variety of languages that is really simple to use and it’s been really easy to implement some basic Twitter functionality into a command-line client. Using TinyXml to parse the results of HTTP requests I can grab posts and user information. Once it’s setup you can make a simple status update with a single method call.

The problem I have now is how to parse the temporal information. It’s one thing to grab simple text but there is a lot of numeric-data embedded in it that is quite useful. I’m looking at Boost.Date to see if that can help, the next thing to do is to be able to say how old a post is and filter results by time. Got any tips for doing this sort of thing?

I’m going to keep playing with this and see if I can come up with something useful for a proper app.

Image | WordPress Themes