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

eeart's avatar
eeart
257 posts
15 years ago
eeart's avatar eeart

@Dabbledoo, no we are not using EngineHosting. And I had just installed it on a page that isn’t live, so I it can’t be the number of requests.

I looked at Twitter Timeline and that uses the email address instead of twitter username. The members of my site already entered their username, so that plugin is not an option for me.

       
Dabbledoo's avatar
Dabbledoo
172 posts
15 years ago
Dabbledoo's avatar Dabbledoo
I looked at Twitter Timeline and that uses the email address instead of twitter username. The members of my site already entered their username, so that plugin is not an option for me.

Hi eeart -

You can use either username OR email address with the Twitter Timeline plugin. The docs on EE’s site are dated I believe.

When you install the plugin, it says the following in the docs (within the plugin manager):

user=”[email protected]” - Email address or user name of Twitter user. Required for “user” or “friends” timelines
       
eeart's avatar
eeart
257 posts
15 years ago
eeart's avatar eeart

I tried Twitter Timeline but it isn’t working for me for some reason. I don’t have the passwords of the twitter feeds to show because I just want to show the public feeds. When I change type to “public” I seem to be just getting the last tweets by anyone, not related to the user I entered.

       
Dabbledoo's avatar
Dabbledoo
172 posts
15 years ago
Dabbledoo's avatar Dabbledoo
I tried Twitter Timeline but it isn’t working for me for some reason. I don’t have the passwords of the twitter feeds to show because I just want to show the public feeds. When I change type to “public” I seem to be just getting the last tweets by anyone, not related to the user I entered.

I believe with that plugin you need to be authenticated (with password) to return a person’s timeline. The way to get around this would be to do what I did: - create a new Twitter account (that you know the password to) - follow the accounts you want to show up in the feed - and then hook that account up to the Twitter Timeline with the type=”friends”

       
Jonathan Schofield's avatar
Jonathan Schofield
175 posts
15 years ago
Jonathan Schofield's avatar Jonathan Schofield

Just discovered this great plugin but have a few issues/questions:

  1. I’m struggling to get reliable results. Had no trouble getting it to display results for a trending topic but can’t get it to find test custom tweets that I know are there.

  2. Could someone please explain the specific effects of the cache and refresh parameters? The docs say “please use it” but don’t say why or what various other settings might achieve.

  3. As others above, would love to have count and total_results variables available to play with.

  4. I have in mind to achieve something similar to fellow EE user Andy Clarke over on his Stuff and Nonsense blog. He displays tweet replies using custom #hashtags. (Though none seem to be displaying on his site currently, perhaps because the related tweets have been archived?)

To do this, I guess I’d need to be able to pass an entry_id to the plugin. If I were using entry_ids as url segments I guess I could just do this:

{exp:twitter_search:find q="#foo{segment_2}" convert_url="yes" cache="yes" refresh="5"}

(Which works.)

But I’m using url_titles in my urls so I’d need to use:

{exp:twitter_search:find q="#foo{entry_id}" convert_url="yes" cache="yes" refresh="5"}

I’ve tried this, including wrapping exp:twitter_search in exp:weblog:entries but no joy.

Anyone have any bright ideas?

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

to get tweets from a specific user do this

{exp:twitter_search:find q="from:EllisLab" convert_url="yes" cache="yes" refresh="5"}
{text}
{/exp:twitter_search:find}

to get tweets from a specific user where that user says something specific do this

{exp:twitter_search:find q="from:EllisLab  CodeIgniter" convert_url="yes" cache="yes" refresh="5"}
{text}
{/exp:twitter_search:find}

to get tweets from 2 specific people

{exp:twitter_search:find q="from:EllisLab from:drencher" convert_url="yes" cache="yes" refresh="5"}
{text}
{/exp:twitter_search:find}

@watershed

1 are your results that you “know are there” on http://search.twitter.com/ ?? also verify here http://search.twitter.com/search.atom?q=from:drencher where q= put your search term..

2 the cache param says for how long your returned results are stored locally before the plug-in tries to go and fetch new results thats it. Twitter will block your IP if you hit the search API too often. Rate unknown see http://apiwiki.twitter.com/Rate-limiting

3 total results or count are not provided by the search API. I wish they were. if you just wish to count over the returned results you could just throw in a php count into the loop. $i=0 then inside the loop echo $i++;

about the {entry_id} try parse=”inward” in the twitter_search tag OR try putting the twitter search in a embed tag and then calling the embed tag passing the entry id as a var into the embedded template

       
davehenderson's avatar
davehenderson
36 posts
15 years ago
davehenderson's avatar davehenderson

Hi There,

Is there a way to pass custom field data into this add-on? I want to add this function in my member profile pages so they can feed in their tweets by adding their twitter username using a custom field:

{twitter_username}

Thanks David

       
davehenderson's avatar
davehenderson
36 posts
15 years ago
davehenderson's avatar davehenderson

Hi Again,

Never mind! I have solved the issue, forgot to add custom field tags:

{exp:member:custom_profile_data}
{exp:twitter_search:find  q="from:{twitter_username}" rpp="5" lang="en" convert_url="yes" cache="yes" refresh="5"}

<div class="tweets">
    <span>{from_user} {location} - about {relative_date} ago.</span>
    {profile_image_url}
    {text}
</div>

{/exp:twitter_search:find}
{/exp:member:custom_profile_data}

Thanks! David

       
davehenderson's avatar
davehenderson
36 posts
15 years ago
davehenderson's avatar davehenderson

Hi All,

Is there any way of changing the default size of the Twitter profile image without pixelating it by using CSS or HTML?

{profile_image_url}

I just need to make it slightly bigger but looks a little rough using CSS or HTML.

Cheers Dave

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
15 years ago
Sean C. Smith's avatar Sean C. Smith

Davehenderson,

upscaling will always result in pixalation of the image.

       
Jonathan Schofield's avatar
Jonathan Schofield
175 posts
15 years ago
Jonathan Schofield's avatar Jonathan Schofield

lumis, FYI, parsing inward didn’t help but thanks so much for the embedding tip which is where the answer lay.

I’d not used embed variables before but, as it may help someone else, here is how I got a dynamic custom hashtag search working in a template that is outputting url_title segments rather than entry_id segments…

I created a twitter search template with an opening tag of:

{exp:twitter_search:find q="#foo{embed:hashid}" convert_url="yes" cache="no" refresh="5"}

Then, in my post template I have:

{exp:weblog:entries site="blog" weblog="blog" limit="1" disable="categories|custom_fields|member_data|pagination|trackbacks"}
  {embed="inc/.twitter_replies" hashid="{entry_id}"}
{/exp:weblog:entries}

Search results are then constrained to things like #foo123.

Obviously, there is potential for ‘foo’ to be a variable used by more than one site so it needs to have a good chance of being unique and yet still be as concise as possible!


My template also includes a prompt for users to Tweet your reply:

Tweet your reply using 
<a href="http://twitter.com/home?status=#foo{entry_id}" title="Creates a draft tweet at twitter.com with the '#foo{entry_id}' hashtag"><em>#foo{entry_id}</em></a>

Note the need to escape the hash with

%23

in the status query sent to Twitter otherwise Twitter will just give the would-be tweeter “Sorry, that page doesn’t exist!”

I’m also adding a trailing space to the status link with

%20

which appears after the hashtag in the update field.

       
Dave @ Exp:resso's avatar
Dave @ Exp:resso
465 posts
15 years ago
Dave @ Exp:resso's avatar Dave @ Exp:resso

Hi there, Just wondering if theres any plans to make this plugin work with 2.0? I’d be happy to put some money towards it if it could be done quickly - looks like its pretty much perfect for a project I’m working on!

CHeers, Dave

       
Badlands's avatar
Badlands
17 posts
15 years ago
Badlands's avatar Badlands

Hi, I am trying to port this to 2.0 but have run in to trouble. going through the flow of the functions I think it’s getting stuck here

function request_json($tagparams){
    $arguments = "";


    $skip = array('cache','refresh','word_censoring','convert_url');

    print_r( $tagparams );
    
    foreach ($tagparams as $key => $value)
        {

$tagparams is a string but I think that the foreach needs an array as the argument. Is this correct? Inside the foreach $key and $value are null so I assume this is where it’s breaking down. Could you explain how this functio works?

Has something changed with the template class that hasn’t been documented?

       
Dave @ Exp:resso's avatar
Dave @ Exp:resso
465 posts
15 years ago
Dave @ Exp:resso's avatar Dave @ Exp:resso

Just letting everyone know we’ve managed to port this great plugin to 2.0 and its all running smoothly so far - send me a PM if you want a copy (have only tested on one site though and haven’t got time to officially support it yet)

       
anonymous61630's avatar
anonymous61630
93 posts
15 years ago
anonymous61630's avatar anonymous61630

The plugin does not work for me. I get a white page and the server error log says: PHP Parse error: syntax error, unexpected ‘}’ in /…/pi.twitter_search.php on line 336

       
First 2 3 4 5

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.