EllisLab text mark
Advanced Search
1 of 4
1
   
New Module: Twit-ee - show data from the Twitter API in EE templates
Posted: 10 February 2009 01:17 PM   [ Ignore ]
Avatar
Joined: 2006-09-09
294 posts

Twit-ee fetches data from the Twitter API and allows you to display it in your ExpressionEngine templates. A variety of tags are available allowing you to show your own tweets, your friends tweets and more.

System Requirements:

* ExpressionEngine Version 1.6.x
* PHP 5.x.x
* cURL support

Example:
The following will show the authenticating user’s 10 most recent favorite tweets with a cache time of 30 minutes

{exp:twitee:favorites refresh="30" limit="10"}
{if count 
== 1}<ul>{/if}
    
<li>{text}</li>
{if count == total_results}</ul>{/if}
{
/exp:twitee:favorites} 


Download, licensing and documentation can be found here.

Please report bugs and add feature requests below.

Feel free to fork the project from GitHub and send a patch / pull request to help with bug fixing and feature requests.

 Signature 

Shape Shed

 
Posted: 10 February 2009 08:46 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2008-12-11
14 posts

Hi George,

Trying to test this out, but I get an error on attempting to install

“Unable to locate the files needed to install this module”

Just thought I’d ping you smile

 Signature 

Biz: http://www.endstate.com
Blog: http://www.kylewrites.com

 
Posted: 11 February 2009 12:32 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2002-03-16
295 posts

Hi George,

nice addition. I was able to install the module, so no problem regarding that point (PHP 5.1.x, EE 1.6.7).

However, I have a small issue I already had with the the twitter_search plugin: The output is broken if the option “Enable GZIP Output?” is set to yes in the output and debugging preferences of EE.

In addition, it would be great if the module would be MSM friendly - e.g. store different twitter account details per MSM site (or allow to overwrite the default setting inside the EE tag).

BTW: I tried to use the project wiki but it seems so need some account edit a page there. Using the forums is less troublesome in that case grin

Markus

 
Posted: 11 February 2009 05:34 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2006-09-09
294 posts

ms - thanks for the report. I’ve amended the post to use this thread for bugs and feature requests.

I’m going to wait for it to be in the wild for a little longer and will then look at bugs and features like making it MSM compatible.

 Signature 

Shape Shed

 
Posted: 11 February 2009 02:31 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2004-12-14
409 posts

For me, I would need two things from this module - if it had them, I’d pay for it:

1) MSM compatibility. At this point, anything released for EE should be MSM compatible. I can’t consider using anything that isn’t.

2) The ability to display replies to a Tweet, preferable within a certain timeframe. So for example say I post an entry, which appears on Twitter. I’d like to be able to tell this module to pull in any @ replies that have come in from within the first, say, 20 minutes. Then I should be able to manually delete any that aren’t truly a direct reply to the entry. Kind of like what you see here: http://chris.pirillo.com/is-amazons-kindle-on-fire/ - that is done by way of Wordpress plugin though. Can Twit-ee already do this?

 Signature 

Love gadgets, technology, and pop culture? Visit us at Gear Live: http://www.gearlive.com

 
Posted: 12 February 2009 05:28 AM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2007-05-09
122 posts

Seems like a really great module, George! Is there a way to format the {created_at} into a prettier form, possibly just Tue Feb 10 17:11?

 
Posted: 12 February 2009 06:33 AM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2006-09-09
294 posts

ms wrote

The output is broken if the option “Enable GZIP Output?” is set to yes in the output and debugging preferences of EE.

This is fixed in version 1.0.1.

Deelicious wrote:

Is there a way to format the {created_at} into a prettier form, possibly just Tue Feb 10 17:11?

I’m not planning support lots of different time formats but thankfully PHP can take care of it for you.

Enable PHP in templates and then use this:

<?php
$created_at 
strtotime("{created_at}");
echo 
date("D M j G:i "$created_at);
?> 

See the PHP date function if you want to change the formatting to pretty much anything else.

Using this method you could also compare the timestamp to now and format a “3 hours ago” or similar .

 Signature 

Shape Shed

 
Posted: 12 February 2009 06:55 PM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Avatar
Joined: 2007-05-09
122 posts

Thanks, George! Worked like a charm. smile

 
Posted: 16 February 2009 04:21 PM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Avatar
Joined: 2004-01-03
14 posts

I’ve installed the module and am getting this error when adding to my template.

Parse errorsyntax errorunexpected T_CONSTexpecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/mysite/public_html/sys/modules/twitee/mod.twitee.php on line 28 

I was using this piece of code in my template:

{exp:twitee:user_timeline refresh="5" limit="10"}
{if count 
== 1}<ul>{/if}
    
<li>{text}</li>
{if count == total_results}</ul>{/if}
{
/exp:twitee:user_timeline} 

Thanks for the help.

Pat ;)

 
Posted: 17 February 2009 08:11 AM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Avatar
Joined: 2002-03-16
295 posts

Pat,

are you sure your webspace is meeting the requirements - especially PHP 5.x? Code looks fine, but the error might imply you’re still using PHP 4.x.

 
Posted: 17 February 2009 12:11 PM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Avatar
Joined: 2004-01-03
14 posts

Hi, thanks for your response.  I thought I was on PHP 5, but I’m double checking now. 

Pat smile

Update:  Am I php5 - but couldn’t get it to work so used the regular Twitter code off their website.

 
Posted: 25 March 2009 11:06 AM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Joined: 2008-09-29
1 posts

I was seeing the same error and I’m running PHP 5.1.6 (hosted at EngineHosting). It was sporadic though and while troubleshooting, I found that occasionally refreshing the PHP Info Utility page, it would instead show that I was running PHP Version 4.3.9

I have a note in with Nevin and crew to determine what’s going on.

When PHP 5.x is running, the module is a wonderful addition. Thanks for your work on this!

Update: It turns out that my site is on a cluster at EH that’s in the middle of an upgrade from PHP 4.x to PHP 5.1.6. It should be completed tonight and resolve the module errors I’m seeing.

 
Posted: 08 April 2009 02:33 AM   [ Ignore ]   [ # 12 ]   [ Rating: 0 ]
Joined: 2007-07-18
147 posts

How can I get links to link? I’m just getting plain text outputs, but I’d like to ensure when I post a link users can actually click it. This:

My tweet text a link http://tinyurl.com/1234 

Should be:

My tweet text a link - <a href="http://tinyurl.com/1234">http://tinyurl.com/1234</a> 

Am I missing something really basic here?

 
Posted: 13 April 2009 01:41 AM   [ Ignore ]   [ # 13 ]   [ Rating: 0 ]
Joined: 2007-04-03
6 posts

I’m attempting to retrieve the status from friends using the {exp:twitee:friends} tag-pair, however the {text} variable keeps returning blank?  Am I using this correctly?  In the end, I basically want to get a list of the authenticated user’s status and the status of the friends, so I’m using the following:

{exp:twitee:user_timeline refresh="15" limit="1"}
<li>{name}{text}</li>
{/exp:twitee:user_timeline}
{exp
:twitee:friends refresh="15"}
<li>{name}{text}</li>
{/exp:twitee:friends} 

Any help would be great.  All variables seem to work except the {text} variable, and I’m at a bit of a loss.  Thanks again.

 
Posted: 01 May 2009 06:05 AM   [ Ignore ]   [ # 14 ]   [ Rating: 0 ]
Avatar
Joined: 2006-09-09
294 posts

There’s a minor update available to this module allowing a separate account for MSM sites. To enable MSM compatibility please upload the new files then uninstall and reinstall the module. The download is available from Github

rick.prince wrote

How can I get links to link? I’m just getting plain text outputs, but I’d like to ensure when I post a link users can actually click it.

This is a feature enhancement - I’ve filed this on the github site.

jonny.gotham wrote

I’m attempting to retrieve the status from friends using the {exp:twitee:friends} tag-pair, however the {text} variable keeps returning blank?  Am I using this correctly?

Yes it does look correct and I can replicate this as a bug. I have filed this as an issue and will address it in an upcoming build.

You can track the status of bugs and feature requests on the Github issues page

 Signature 

Shape Shed

 
Posted: 01 May 2009 07:23 AM   [ Ignore ]   [ # 15 ]   [ Rating: 0 ]
Avatar
Joined: 2006-09-09
294 posts

I’ve just pushed a further update (version 1.15) up to Github.

This now automatically converts links to html links, and also supports hash tag links and links to @username.

@jonny.gotham

You need the friends_timeline method to get the statuses of friends. Try this code:

{exp:twitee:user_timeline refresh="15" limit="1"}
<li>{name}{text}</li>
{/exp:twitee:user_timeline}
{exp
:twitee:friends_timeline refresh="15"}
<li>{name}{text}</li>
{/exp:twitee:friends_timeline} 
 Signature 

Shape Shed

 
1 of 4
1