This post comes from a Twitter workshop series that I've been doing in Catalan over at Dra. Piula. I mean to translate it into English, but for now I may just do highlights. We'll see. But I thought this post about customizing a Twitter feed widget would interest a lot of English speakers as well. Here goes:
You may already know how to create a Twitter widget for your blog or WordPress. It's not hard. You go to Settings in Twitter, click Widgets on the left, Create New on the right, and then choose criteria for the contents of the Twitter feed. Then click Create, and copy the code to your blog.
But how can you go beyond Twitter's basic search options? At first glance, it looks like you have to choose between a User timeline OR Favorites OR a List OR Search OR a Collection:
But what do you do if you want a user's timeline with a certain hashtag? What if you only want to someone's tweets in English? :) Or you want to see all of the tweets of a group, but only regarding a particular topic?
I'll show you.
To begin, make a normal widget using the Search option and enter the first topic that interests you into the Search Query box:
Notice that the Preview populates with all of the tweets that satisfy that criteria, which I can promise for Barcelona, means a lot of varied tweets.
Let's search only for tweets in English. Use lang:en (the two letter language code for English. And note that ca is for Catalan, but it doesn't work).
Now let's get rid of tweets that mention FCBarcelona, as much as we may love them, since they tend to block everything else out about Barcelona. Use -FCBarcelona
How about only tweets (and retweets) by me? Use from:lizcastro
The possibilities are endless. You can precisely tailor your Twitter feed gadget to your audience, without having to limit your activity on Twitter itself.
What other criteria can we use for a search? Here's all the ones I found:
- To search for a given word or hashtag, just list it:
- To exclude criteria from the search, use a minus sign:
- To find tweets in only a given language, use lang followed by the two letter code for the desired language:
lang:fr. Unfortunately, Twitter doesn't know how to distinguish tweets that are in Catalan, sometimes it thinks they're Portuguese, sometimes Romanian, sometimes Italian. And if I tell it to show me only Catalan tweets, it doesn't show any at all :(
- By default, RTs are included. If you don't want them, add
- If you want only tweets that contain images, use
- If you want only tweets that contain videos, use
- If you want only tweets that contain vines, use
- If you want tweets with links, use
- If you want tweets from a given Twitter account, use
from:TwitterName(no @ needed)
- If you want only tweets from verified Twitter accounts, use
- If you want tweets only from the accounts belonging to a given list, use
list:list owner name/list name
- If you want only tweets who have received a given number of replies, use
min_replies:n, where n is that number
- If you want only tweets with a certain number of favorites, type
min_faves:n, where n is that number
- If you want only tweets with a certain number of RTs, use
min_retweets:n, where n is that number
You can use AND, OR and parentheses to combine criteria:
- If you separate each criteria with a space, Twitter concludes that you want only tweets that satisfy all the criteria. As if you typed an AND between them. So
Catalan independencewill get you tweets that include both Catalan and independence.
- If you separate each criteria with an OR, Twitter will show you tweets that satisfy either one criteria or the other.
- If you want to exclude a criteria, use the minus sign (equivalent to NOT).
- You can use parentheses to combine criteria in various ways
(Catalan OR independence) lang:enwould get you all tweets in English that talk about either Catalan or the independence (so you might get Catalan books or Scottish independence, for example).
Are you thinking about all the possibilities?
min_retweets:100to get only the user's most popular tweets
lang:ento get only a user's tweets in a given language
-lang:ento get only a user's tweets that are not in English
from:usernamewith a search term to see only the user's tweets that are about a given topic
-from:usernameto get all of the tweets from a list, except for from one person in particular
- And so on and so on.
To sum up, let's look at that Twitter feed we created, with tweets from me, about Barcelona, not including FCBarcelona, and only in English (on the left) compared with my standard Twitter feed on the right: