EE Twitter Search allows you to search Twitter by various different operators or/and by Geo Location
The below example shows everyone talking about obama within 25km of latitued and longitude of 30.686935,-88.071213
{exp:twitter_search:find q="obama" geocode="30.686935,-88.071213,25km" rpp="5" convert_url="yes" cache="yes" refresh="5"}
{text}
{to_user_id}
{from_user}
{location} only works with geocode=""
{id}
{from_user_id}
{iso_language_code}
{profile_image_url}
{created_at format="%D, %M %d %Y - %g:%i %a"}
{switch="one|two"}
{/exp:twitter_search:find}
forgive me is there is already a ee plug-in for the “Twitter search” API but i could not find one.
This is different from the “Twitter Timeline Plug-in”. Where the “Twitter Timeline Plug-in” is tied to a specific users or a users contacts the “EE Twitter Search Plug-in” searches all of Twitter for your provided search operator (see doc’s)
full doc’s and download here
I’m currently using it like this which is also nice 😉
{exp:twitter_search:find q="{segment_3}" rpp="5" lang="en" convert_url="yes" cache="no" refresh="5"}
<div class="tweets">
{profile_image_url}
<span>{from_user} {location} - {created_at format="%m-%d %g:%i %a"}</span>
{text}
</div>
{/exp:twitter_search:find}
http://www.example.com/tests/twitter-search/expressionengine
Using it on a page that only I know about so I can search for anything I want really quickly 😉
Thanks again for such a great plugin!
Best wishes,
Mark
here is a example I setup on our politics section currently showing self updating live Inauguration Tweets.
Yep that would have been the next thing I would do using some Ajax to live update. Any chance you might share a really easy way of doing this with your plugin as my Javascript isn’t quite up to scratch at the moment.
This is a fantastic plugin and one I could (and will) recommend to everyone.
Best wishes,
Mark
I am using this plugin and all of sudden today it stopped pulling anything in when using the from a particular user param. It worked fine yesterday but today it will not pull anything in. If I change it to just keyword then it works but I need to only pull the latest tweets from a single user. Any idea what may have happened? This is what I have in my tag (this example is using your username which doesn’t pull anything either btw)
{exp:twitter_search:find q="from:lumis" rpp="5" lang="en" convert_url="yes" cache="yes" refresh="5"}
However, if I take out the from: then it works with the username I’m using. So I can get it to work like this
{exp:twitter_search:find q="lumis" rpp="5" lang="en" convert_url="yes" cache="yes" refresh="5"}
But of course that is not going to display what I need. Any idea what may be happening here?
Thanks, Tori [email protected]
Tori do you get the same results if you pass the q= in the below URL’s
http://search.twitter.com/search.atom?q=from:fred
or just
http://search.twitter.com/search.atom?q=fred
the above URL’s are similar to the feed the plug-in fetches which uses the Twitter API
the API should return the same thing a search at this URL does (but not always) http://search.twitter.com/ I have seen the Twitter API behave strangely sometimes and not return results i know are there and all i can really attribute it to is they are having issues with there API or some sort of API fronting they may have setup. But most of the time it works fine.
Also make sure you have Caching off in the tag and templates when you are testing
It seems that EE Twitter Search somehow interferes with the “Enable GZIP Output?” setting on my server.
If “Enable GZIP Output?” is set to “No”, the page shows fine, but if it is set to “Yes”, each page containing the exp:twitter_search:find tag pair triggers a browser error regarding a wrong or unsupported compression type (tested in different browsers).
Markus
Markus Give it a try now
Wow … that was ultra-fast! Page displays fine - thanks a lot, David!
Markus
BTW: Could you explain the parameters cache= and refresh= a bit? I couldn’t find them listed in the Twitter API, nor in the source code of the plugin and get unexpected results (from showing no tweets at all to showing older tweets) when using these parameters.
Suddenly, no tweets are displayed anymore, but the same query sent directly to twitter via /search.atom?q=… displays a feed of tweets as expected.
I can’t think of anything that could have changed in the meantime. Still trying to figure out if it could be related to the cache= and refresh= parameters as mentioned above?
Markus
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.