diff --git a/twitter/jquery.tweet.js b/twitter/jquery.tweet.js
index e2c3611..19c1bd3 100644
--- a/twitter/jquery.tweet.js
+++ b/twitter/jquery.tweet.js
@@ -290,16 +290,20 @@
resp = response;
}
- var tweets = $.map(resp, extract_template_data);
- tweets = $.grep(tweets, s.filter).sort(s.comparator).slice(0, s.count);
+ if(resp.errors !== undefined) {
+ list.append($.map(resp.errors, function(o) { return "
" + o.message + ""; }).join(''));
+ } else {
+ var tweets = $.map(resp, extract_template_data);
+ tweets = $.grep(tweets, s.filter).sort(s.comparator).slice(0, s.count);
- list.append($.map(tweets, function(o) { return "" + t(s.template, o) + ""; }).join('')).
- children('li:first').addClass('tweet_first').end().
- children('li:odd').addClass('tweet_even').end().
- children('li:even').addClass('tweet_odd');
+ list.append($.map(tweets, function(o) { return "" + t(s.template, o) + ""; }).join('')).
+ children('li:first').addClass('tweet_first').end().
+ children('li:odd').addClass('tweet_even').end().
+ children('li:even').addClass('tweet_odd');
- if (s.outro_text) list.after(outro);
- $(widget).trigger("loaded").trigger((tweets ? "empty" : "full"));
+ if (s.outro_text) list.after(outro);
+ $(widget).trigger("loaded").trigger((tweets ? "empty" : "full"));
+ }
if (s.refresh_interval) {
window.setTimeout(function() { $(widget).trigger("tweet:load"); }, 1000 * s.refresh_interval);
}