What’s the default behavior when you use more than one term in the q=”kayak kayaking”?
Here’s my code:
{exp:twitter_search:find q="kayak kayaking" rpp="1" lang="en" convert_url="yes" cache="yes" refresh="5"}
<div class="tweets">
<span>{from_user}</span>
{profile_image_url}
{text}
</div>
{/exp:twitter_search:find}
I’d like to return let’s say 10 tweets containing the keywords ‘kayak’ and ‘kayaking’. If I use two keywords, does it return twice as many entries?
I also have rpp set to 1 but it’s returning 15 tweets. Am I missing something in the API?
Any help would be appreciated.
Also…
Is there a way to put this inside of a conditional, so that if there’s an error or the API calls have been maxed to display nothing?
for instance
{if twitter != ""}
{exp:twitter_search:find q="kayak kayaking" rpp="1" lang="en" convert_url="yes" cache="no" refresh="5"}
<div class="tweets">
<span>{from_user}</span>
{profile_image_url}
{text}
</div>
{/exp:twitter_search:find}
{/if}
Thanks!
Thx Lumis!
Exactly what I was looking for. Everything seems to be in working order now. I was having some trouble with the rpp returning 15 when I asked for 5. I’m presuming this was a cache issue or the way I was declaring the ‘q=’ variable ….. anyhow, seems to have resolved itself now.
Thank you again.
Here’s my original code:
{exp:twitter_search:find q="kayaking seakayak" rpp="5" lang="en" convert_url="yes" cache="no" refresh="5"}
<div class="tweets">
{profile_image_url}
<span>{text}</span>
</div>
{/exp:twitter_search:find}
I thought maybe the twitter API was interpreting my ‘q’ variable as 3 queries — 1 for kayaking, 1 for the whitespace and 1 for seakayak. Wondering if this was happening since I wasn’t using
q="kayaking OR seakayak"
ok i found the problem its fixed now if you want to download new version
here are some examples
All of these words
{exp:twitter_search:find q="cow moon" rpp="5" lang="en" convert_url="yes" cache="yes" refresh="5"}
{profile_image_url}{text}
{/exp:twitter_search:find}
Any of these words
{exp:twitter_search:find q="cow OR moon" rpp="5" lang="en" convert_url="yes" cache="yes" refresh="5"}
{profile_image_url}{text}
{/exp:twitter_search:find}
exclude words
{exp:twitter_search:find q="kayaking -kayak" rpp="5" lang="en" convert_url="yes" cache="yes" refresh="5"}
{profile_image_url}{text}
{/exp:twitter_search:find}
This exact phrase
{exp:twitter_search:find phrase="cow moon" rpp="5" lang="en" convert_url="yes" cache="yes" refresh="5"}
{profile_image_url}{text}
{/exp:twitter_search:find}
pretty much anything you can pass into this form http://search.twitter.com/advanced you can pass into this ee tag you can just take the URL vars returned after the search on that form and add them to the EE tag
the only exception would be the location would have to be passed in through the geocode= as “lat,lon,distance”
Hi Lumis.
Thanks again for a great plugin - between this and eeFlickr you’ve saved me countless nights.
Questions:
Can I run more than one feed on one page? I’m getting varying results; sometimes it works, sometimes it doesn’t. Does your caching support this?
What are the API guidelines from twitter. If I hit their server 10 times (for 10 different feeds) are they going to have a problem with it; is it going to prevent me from doing it?
Thanks, Richard
@Richard
yes more than one feed per page works fine. The caching is EE’s native tag caching. alternatively you can also use template caching.
you can find the guidelines on Twitters API here http://apiwiki.twitter.com/Terms-of-Service
and rate limiting here http://apiwiki.twitter.com/Rate-limiting
The default rate limit for calls to the API is 100 requests per hour. The API does account- and IP-based rate limiting. Authenticated API calls are charged to the authenticating user’s limit while unauthenticated API calls are deducted from the calling IP address’ allotment.
This plug-in is unauthenticated calls
Could you change your php short tags to standard PHP tags? On servers that don’t support short tags, it renders the plugin page as blank. It’s a small issue and easily changed, but it might be affecting other people.
It was doing this in your Relative Date plugin as well.
Thanks, Wes
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.