some problems with the as2 sources

4 views
Skip to first unread message

renk...@gmail.com

unread,
May 31, 2007, 2:24:39 PM5/31/07
to Twitter Development Talk
hello guys,

ive got several questions about the as2 sources for the twitter-api.
iam building a flash-interface. local i can do every action...but live
happening some strange things.

its an an early design phase..sorry for the scrolling :-)
http://www.flashpunk.de/_junk/twittertest/twitter.html

first of all. i did a kind of login thats saves your screen_name and
pw. but my browser asking me, too. why?

i couldnt send my new status. i used charles-proxy for help and he
said :

Sorry, due to abusive behaviour, we have been forced to disable
posting from external websites. If you are posting from an API tool,
please ensure that the HTTP_REFERER header is not set.


in the fla file of the as2-sources is the following code:

twitter = new TWITTER();
twitter.addEventListener("onFriendsTimeline", this);
twitter.loadFriendsTimeline("renkster");
function onFriendsTimeline(event_obj) {
trace(event_obj.code[0].text)
}

is TWITTER.as:

//requires authorization
//returns TWITTER.onFriendsTimeline(statusArray)
function loadFriendsTimeline(userID) {
twitter_lv.sendAndLoad("http://twitter.com/statuses/
friends_timeline/"+userID+".json", friendsTimeline_lv);
}

so..where is the auth?
shouldnt it be?:

twitter.auth(email,pw)
twitter.loadFriendsTimeline("renkster");

for sending a new status i use(simplified):

this.BTN_status.onRelease = function() {
twitter.setAuth(email,pw);
twitter.setStatus(TF_status.text);
};

which works local, but not online.


some help would be really great.

thanks
olee

renk...@gmail.com

unread,
May 31, 2007, 4:35:05 PM5/31/07
to Twitter Development Talk
after begin vom scratch there is another issue:

if i try:

function setStatus(status_str) {
if (status_str.length<=160) {
status_lv.status = status_str;
status_lv.load("http://twitter.com/statuses/update.json");
} else {
trace("STATUS NOT SET: status limited to 160 characters");
}
}

there is a oad error. ( Error opening URL "http://twitter.com/statuses/
update.json")


it has to be

function setStatus(status_str) {
if (status_str.length<=160) {
status_lv.status = status_str;
status_lv.sendAndLoad("http://twitter.com/statuses/
update.json",onStatus_lv);
} else {
trace("STATUS NOT SET: status limited to 160 characters");
}
}

if there is no recieving loadVars and status_lv does not sendAndLoad()
ill get an : error opening url

do i make a mistake??!!

thanks
olee


Reply all
Reply to author
Forward
0 new messages