Retrieve status.id of a tweet posted via tweetbox using @Anywhere

33 views
Skip to first unread message

RobbyC

unread,
Nov 5, 2010, 1:09:19 PM11/5/10
to Twitter Anywhere Development
What is the best method of retrieving the tweet properties of a status
posted via a tweetbox?

The following returns the status.id of the previous tweet, not the
tweet that has just been submitted:

T("#tbox").tweetBox({
height: 100,
width: 330,
defaultContent: "my message",
label: "Share on Twitter",
onTweet: function (txtTweet,htmlTweet){
GetLastTweetID();
}
});


function GetLastTweetID(){
var currentUser = T.currentUser;
alert(currentUser.status.id);
}



Ideally I am looking to do something like this:
var myTweet = T("#tbox").tweetBox({
height: 100,
width: 330,
defaultContent: "my message",
label: "Share Twitter"
});

alert(myTweet.id);

-OR-

T("#tbox").tweetBox({
height: 100,
width: 330,
defaultContent: "my message",
label: "Share on Twitter",
onTweet: function (txtTweet,htmlTweet){
GetLastTweetID(T);
}
});


function GetLastTweetID(T){
var currentUser = T.currentUser;
alert(currentUser.status.id); //WHICH CURRENTLY RETURNS THE
PREVIOUS STATUS ID
}


I've seen people pull the last x tweets from the timeline... but man
that appears super inefficient... gotta believe there is someway to
get the status id from the tweetBox onTweet parameter but I'm just not
seeing it.

Also, I want to accomplish this via javascript without a server side
proxy (php or .net) on my end... pure js baby.

Thanks in advance!
Reply all
Reply to author
Forward
0 new messages