We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

EE Twitter Search

Development and Programming

lumis's avatar
lumis
119 posts
16 years ago
lumis's avatar lumis

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
       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

This looks like an absolutely fantastic plugin, well done David and thanks for sharing it!

Will be trying this one out as soon as I can.

Best wishes,

Mark

       
Philip Zaengle's avatar
Philip Zaengle
293 posts
16 years ago
Philip Zaengle's avatar Philip Zaengle

Thanks David! This looks like a lot of fun!

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
16 years ago
Leevi Graham's avatar Leevi Graham

This looks great. Can’t wait to try it in an upcoming project!

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

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

       
lumis's avatar
lumis
119 posts
16 years ago
lumis's avatar lumis

here is a example I setup on our politics section currently showing self updating live Inauguration Tweets.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

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

       
W3BG's avatar
W3BG
6 posts
16 years ago
W3BG's avatar W3BG

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]

       
lumis's avatar
lumis
119 posts
16 years ago
lumis's avatar lumis

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

       
ms's avatar
ms
274 posts
16 years ago
ms's avatar ms

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

       
lumis's avatar
lumis
119 posts
16 years ago
lumis's avatar lumis

Markus Give it a try now

       
ms's avatar
ms
274 posts
16 years ago
ms's avatar ms
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.

       
ms's avatar
ms
274 posts
16 years ago
ms's avatar ms

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

       
ms's avatar
ms
274 posts
16 years ago
ms's avatar ms

Update: Now, Tweets are showing again without any change at all. Really suspect some caching problem … the embeded template pulling the tweets is not cached at all, so most likely my tag parameters are funky.

       
DEA's avatar
DEA
257 posts
16 years ago
DEA's avatar DEA

There’s always the possibility too that either the API limit was hit, or that there was just some downtime on Twitter’s part…

       
1 2 3 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.