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

New Module: Twit-ee - show data from the Twitter API in EE templates

Development and Programming

George Ornbo's avatar
George Ornbo
272 posts
16 years ago
George Ornbo's avatar George Ornbo

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}
       
jonny.gotham's avatar
jonny.gotham
6 posts
16 years ago
jonny.gotham's avatar jonny.gotham

But what if I’m attempting to only get the latest status from each friend, as in 1 status per friend being followed, rather than the stream of the latest 20. That was why I went with using :

{exp:twitee:friends}
{/exp:twitee:friends}

As the description says that it “Returns the authenticating user’s friends, each with current status inline. They are ordered by the order in which they were added as friends.” So what I’m attempting to display is the friend and current status, 1 status per. Is that possible?

Thank you for the help!

       
kevin332's avatar
kevin332
50 posts
16 years ago
kevin332's avatar kevin332

This tweet cut off right before the ampersand and gives this error message:

Warning: Twitee::_parse_status() [function.Twitee--parse-status]: unterminated entity reference Osugi Ren as "shockers": <a href="http://bit.ly/2gU1O">http://bit.ly/2gU1O</a> in /home/myacct/public_html/mydir/systemfolder/modules/twitee/mod.twitee.php on line 433
       
jonny.gotham's avatar
jonny.gotham
6 posts
16 years ago
jonny.gotham's avatar jonny.gotham

George:

Thanks again for all the work with this module.

I have a question though. Does the Twit-ee module have a fail-safe in place or a user adjustable timeout if Twitter goes down? With the boom in Twitter popularity and maintenance issues it’s been having recently, I just wanted to know what will happen if Twitter itself fails. At this point I know that invalid login information in the module will stop the entire site in its tracks, but will the same happen if the module cannot connect to Twitter? If so, is there a way for me to prevent that?

I have noticed definite slow-downs and stalls after introducing the module, and while some is expected with the API call, I wonder if the stalls are related to the module not being able to connect to twitter and a long timeout delay?

Any information would be great! Thanks again for the great module!

       
kevin332's avatar
kevin332
50 posts
16 years ago
kevin332's avatar kevin332

When Twitter goes down I see php error messages but the page still loads fine with the tweets blanked out. Make sure debugging messages are set to admin-only so it doesn’t interfere with normal readers.

Edit:

Conveniently, Twitter just went down. Here are my error messages:

Warning: simplexml_load_file() [function.simplexml-load-file]: /home_directory/system_directory/cache/twitter_cache/1_user_timeline.xml:1: parser error : Document is empty in /home_directory/system_directory/modules/twitee/mod.twitee.php on line 250
Warning: simplexml_load_file() [function.simplexml-load-file]: in /home_directory/system_directory/modules/twitee/mod.twitee.php on line 250
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home_directory/system_directory/modules/twitee/mod.twitee.php on line 250
Warning: simplexml_load_file() [function.simplexml-load-file]: /home_directory/system_directory/cache/twitter_cache/1_user_timeline.xml:1: parser error : Start tag expected, '<' not found in /home_directory/system_directory/modules/twitee/mod.twitee.php on line 250
Warning: simplexml_load_file() [function.simplexml-load-file]: in /home_directory/system_directory/modules/twitee/mod.twitee.php on line 250
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home_directory/system_directory/modules/twitee/mod.twitee.php on line 250
Notice: Trying to get property of non-object in /home_directory/system_directory/modules/twitee/mod.twitee.php on line 430
Warning: Invalid argument supplied for foreach() in /home_directory/system_directory/modules/twitee/mod.twitee.php on line 430
George: Thanks again for all the work with this module. I have a question though. Does the Twit-ee module have a fail-safe in place or a user adjustable timeout if Twitter goes down? With the boom in Twitter popularity and maintenance issues it’s been having recently, I just wanted to know what will happen if Twitter itself fails. At this point I know that invalid login information in the module will stop the entire site in its tracks, but will the same happen if the module cannot connect to Twitter? If so, is there a way for me to prevent that? I have noticed definite slow-downs and stalls after introducing the module, and while some is expected with the API call, I wonder if the stalls are related to the module not being able to connect to twitter and a long timeout delay? Any information would be great! Thanks again for the great module!
       
Jort_K's avatar
Jort_K
13 posts
16 years ago
Jort_K's avatar Jort_K

Hi George,

Is there a possible functionality to display a list of “following” or “followers” (just like on twitter on the right corner with the small images)?

Regards,

Jort

       
medic119's avatar
medic119
52 posts
16 years ago
medic119's avatar medic119

How about date formatting. I understand I can format it with php, but its pretty standard to enable EE style formatting in the tag itself. Saves issues with php and such.

ie:

{created_at format="%H:%i on %l, %F %d, %Y "}
       
medic119's avatar
medic119
52 posts
16 years ago
medic119's avatar medic119

Is there a way to get it to ignore @replies? I saw there is a way to get just replies, but timline can’t be formatted to ignore replies that I can find.

       
Ian Ebden's avatar
Ian Ebden
312 posts
about 16 years ago
Ian Ebden's avatar Ian Ebden

Nothing’s showing up in my template. Twitter username/password fine. I’m just using the example tags at the moment, but no joy…

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

Hmmm… Any help much appreciated.

       
Benjamin David's avatar
Benjamin David
77 posts
about 16 years ago
Benjamin David's avatar Benjamin David

Same here, nothing shows up in my templates. I’m using the example tags too.

       
shinka's avatar
shinka
138 posts
about 16 years ago
shinka's avatar shinka

…Nevermind…

       
shinka's avatar
shinka
138 posts
about 16 years ago
shinka's avatar shinka

Got it installed and everything seem to be working, but I’m getting this error:

Notice: Undefined property: Twitee::$convert_links in /home/seniorcl/public_html/systemadmin/modules/twitee/mod.twitee.php on line 629

Notice: Undefined property: Twitee::$convert_links in /home/seniorcl/public_html/systemadmin/modules/twitee/mod.twitee.php on line 629
       
eyevariety's avatar
eyevariety
158 posts
about 16 years ago
eyevariety's avatar eyevariety

After playing with this module for months- I am unable to use it on a live site because of twitter’s unreliable connections. If you were to implement a caching mechanism this module would be much more reliable.

       
Thomas Sausen's avatar
Thomas Sausen
75 posts
15 years ago
Thomas Sausen's avatar Thomas Sausen

Notice: Undefined property: Twitee::$convert_links in /(…)/twitee/mod.twitee.php on line 629 Notice: Undefined property: Twitee::$convert_links in /(…)/twitee/mod.twitee.php on line 629

Everything else should be ok. So what can I do?

And how can I make links to my own twitter-Profile and to bitly working? Hashtags are linked. But shorten_urls don’t.

       
daapster's avatar
daapster
7 posts
15 years ago
daapster's avatar daapster

I have just started using this module today, and it works perfectly…half the time. For some reason, the tweets show up for about 15-30 minutes, and then vanish for about the same length of time before reappearing again. This cycle has continued since I installed. I’ve tried varying refresh times, but that didn’t seem to affect anything. I also tried a few JQuery plugins, and the would go down at exactly the same time as Twit-ee. The only solution that is showing up consistently is tapping directly into Twitter’s API, but I would prefer not to try to sort out all the parameters and details of that when Twit-ee is such a simple solution.

Does anyone have any ideas as to what might be causing this?

       
1 2 3 4

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.