views:

40

answers:

1

I normally use twitter both as a communication chat and as a short blog service. On my wordpress blog, I import the twitter messages timeline from one twitter account (specific for the blog-visible messages). For communication and chatting, I use another twitter account.

Having two account is a solution, but my geeky nature would prefer to have only one account, with the following magic: every message containing a special tag (e.g. "#blog") will appear on my wordpress blog page. Everything else will not appear on the blog.

Is it achievable with the standard twitter API? does something like this already exist for wordpress? The technical solution would be equivalent to a search for a tag only on a specific user's messages, something that, as far as I see, is currently not possible.

Thanks.

+1  A: 

You'll want to use the twitter search API. Use this url to pull the data that you want to display:

http://search.twitter.com/search.xml?q=%23blog&from=mikeluby

You can change the .xml to .json if you want the query to return in json. Remove the ".xml" to get the normal search page to test out the query. Obviously you'll want to change "mikeluby" (my twitter username) to your username.

Update: There may be an issue with the xml return currently on twitter. I would check to see if it works for you. If it doesn't I would suggest switching to the json return or waiting until the problem is fixed.

mikeluby
xml does not work, but .rss and .json do. Thanks!
Stefano Borini
You are right, they must have updated the documentation recently. And here is the link to the documentation: http://apiwiki.twitter.com/Twitter-Search-API-Method%3A-search
mikeluby