Skip to content

Instantly share code, notes, and snippets.

@thaniaclair
Created May 11, 2013 20:27
Show Gist options
  • Save thaniaclair/5561317 to your computer and use it in GitHub Desktop.
Save thaniaclair/5561317 to your computer and use it in GitHub Desktop.
Recupera o último tweet JS.
var lastTweet = {
init: function() {
lastTweet.show();
},
getAbsolutePath: function() {
return $("meta[name='path']").attr("content");
},
show: function() {
var params = { "nomeUsuarioTwitter" : "sebrae_sc_sis" };
var url = lastTweet.getAbsolutePath() + "ajax/getLastTweet";
$.ajax({ type: "post", url: url, data: params, dataType: "json",
success: function (json) {
$(".twitter .last").html(json.tweet);
}
});
}
};
$(function() {
lastTweet.init();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment