views:

172

answers:

5

Hello

I would need to get tweets from my twitter account on my wordpress site. Okey, the basics i could do, but there is one special need. I would need to get only certain tweets. Tweets that have some #hashstag for example only tweets with hashtag #myss would show up on my wordpress site.

Is there ready made plugin for this? I have been googlein for hours but have found only basic/normal twitter plugins.

Also i would need to able style the feed to look same as my current site.

Cheers!

+2  A: 

The twitter API is pretty good at doing this sort of thing.

You could use the Twitter Search API to construct a url like the following:

http://search.twitter.com/search.json?q=from:yourusername+AND+#hashtag

You could easily write some javascript to parse this. See my code at http://www.electricbiro.co.uk for easily reading Twitter using only jquery. (View source on the page).

$.getJSON('http://search.twitter.com/search.json?q=from:yourusername+AND+#hashtag&callback=?', function(data){
                $.each(data, function(index, item){
                    $('#twitter').append('<div class="tweet"><p>' + item.text.linkify() + '</p><p>' + relative_time(item.created_at) + '</p></div>');
                });
            });

You could quite easily package this into a wordpress plugin.

Rob Stevenson-Leggett
I tried that but I dont get anything out of it? hmmm
darreee
Nice man. Thanks for posting a non-plugin solution! @darreee you could add this in your functions.php file and hook it in to wp_head and than create the id (#twitter) it's targeting some where on your page.
hsatterwhite
I don't think my search query is quite right actually but it should essentially work. Think the plugins might be better.
Rob Stevenson-Leggett
A: 

I tried that but I dont get anything out of it? Could someone help?

darreee
+1  A: 

Go to http://search.twitter.com/ and enter the hashtag you want. Then click on 'Feed for this query' in the top right hand corner to get a URL. Then add a normal RSS widget to your wordpress site adding the URL you got previously. That should work.

Goldy
A: 

@goldy

Yes but I need the tweets from my account only

mkoso
+1  A: 

There is a plugin called :

Twitter Hash Tag Widget : A widget for displaying the most recent twitter status updates for a particular hash tag. http://sivel.net/2009/06/twitter-hash-tag-widget/

and
Twitter tools : Twitter Tools is a plugin that creates a complete integration between your WordPress blog and your Twitter account. http://wordpress.org/extend/plugins/twitter-tools

and twitter blender : Better than Twitter's own widgets - Tweet Blender is tag-aware and has support for multiple authors, lists, hashtags, and keywords all blended together. The plugin can show tweets from just one user or a list of users (as all other Twitter plugins do); however, it can also show tweets for a topic which you can define via Twitter hashtag or keyword. But there is more! It can also show tweets for multiple authors AND multiple lists AND multiple keywords AND multiple hashtags all blended together into a single stream. http://wordpress.org/extend/plugins/tweet-blender/

Hope any of those help :)

mireille raad