Twitter Smartlet


Smartlet Icon

The Twitter Smartlet queries the Twitter Search API and displays the results.

Updates

  • 2.0 (September 15, 2010)
    • Bugfix: id attribute written twice
    • Enhanced user experience: tweets now slide in individually, interval-based
    • CSS fixes
  • 3.0 (September 24, 2010)
    • Cookie used for storing last shown tweet. When returning to the page, the show goes on where you left.
      Note: uses jQuery.cookie.js.
  • 3.1 (November 10, 2010)
  • 3.2 (January 21, 2011)
    • jQuery_cookie.js is now truly optional. No exception is raised when cookieAge is set to non-zero value, or omitted (default=7)
Rate this Smartlet
You are not allowed to rate this page.
Comments
Johan Kanselaar - Tuesday, April 27, 2010 11:30 AM

Why isn't this one on the homepage anymore?

Marc van Neerven - Tuesday, March 15, 2011 4:58 PM

A small but irritating bug in the cookie handling is that the last seen tweet in the twitter window is not remembered. Going back to the page again showed older tweets and the tweets seen previously would op up again.

This can be fixed quite easily by updating the Script item in the Smartlet:

Old code:

var origCaption = caption.html();
var cookieAge = parseInt(sml.get('cookieAge'));
if(cookieAge != 0){
	if($j.cookie){
	var cookieName =  settings.guid + '.id';
	var lastTweet = $j.cookie(cookieName);

New code:

var origCaption = caption.html(), lastTweet;
var cookieAge = parseInt(sml.get('cookieAge'));
if(cookieAge != 0){
	if($j.cookie){
	var cookieName =  settings.guid + '.id';
	lastTweet = $j.cookie(cookieName);

A new version of the Twitter Smartlet will be posted soon, but this may help in the meantime....

Johan Kanselaar - Thursday, March 17, 2011 5:36 PM

Hmm according the homepage there is a comment here from Marc van Neerven. I don't see a comment here. Testing if i can see comments I add myself.

Johan Kanselaar - Thursday, March 17, 2011 5:37 PM

Nope, no comments anymore after reloading the page.

Marc van Neerven - Tuesday, March 22, 2011 9:55 AM

Item comments were temporarily hidden due to an issue in 1.4, and since we're actively dogfooding the latest builds here, you guys have to suffer ;-). Fixed!

Johan Kanselaar - Wednesday, March 23, 2011 3:28 PM

ah thanks! :)

Marc van Neerven - Tuesday, August 02, 2011 2:56 PM

Small update: data retrieved by the Twitter search query has to be encoded for presentation:

Replace the following code in the Format() translation:

scope.format.field(text)

... with:

string.xmlencode(scope.format.field(text), Ampersand))
Ruben Verschueren - Monday, January 30, 2012 3:31 PM

I get an 'operation has timed out' error (even for the examples). however if I browse to the uri's it get an immediate response.

What could be the problem here?

Marc van Neerven - Tuesday, April 17, 2012 1:30 PM

An issue has been reported that expanding of hyperlinks fails when immediately followed by '.' or ','.

To fix this issue, replace the first regular expression in the Expand() translation with the following regexp:

((ftp|http|https):\/\/(\w+:{0,1}\w*@)?([^\.,]|[\.,]\S)+(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)
You are not allowed to post here.

Stay in Touch
Profile
Latest additions
Smartsite iXperion 1.4 build 6 has been released! locked
Twan Meijerink, 01 May 2012, 14:42
Workbench beta has expired
Hank Brandwijk, 11 January 2012, 16:53
Smartsite iXperion 1.4 build 4 has been released! locked
Twan Meijerink, 02 December 2011, 11:04
The second life of XForms
Marc van Neerven, 04 November 2011, 18:34
How to hide a property in a custom module? locked
Peter van der Waal, 17 October 2011, 09:31
Microsoft Certified Partner Logo