Comunidad de diseño web y desarrollo en internet online

api de twitter

Citar            
MensajeEscrito el 18 Nov 2010 02:07 pm
para probar la api de twitter tiene qe estar el proyecto si o si online??

Por eze_ps

30 de clabLevel



 

chrome
Citar            
MensajeEscrito el 18 Nov 2010 02:07 pm
Tienes que tener acceso a Internet

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 18 Nov 2010 02:19 pm
si intenter tengo

hice esto



package {

import flash.display.*;
import flash.events.*
import flash.net.*;

public class loadTwitter extends MovieClip {
private var _twitterXML:XML; // Variable donde se almacena el XML con todos los datos del twitter

public function loadTwitter() {
trace("hola");
var Usuario:String="eze_arg"; // Nombre de usuario de twitter de donde va a cargar los datos
var Cantidad:int=10; // cantidad de comentarios que va a cargar

// Arma la Url de donde va a obtener los datos
var url:String="http://twitter.com/statuses/user_timeline/"+Usuario+".rss?count="+Cantidad.toString();

var urlReq:URLRequest = new URLRequest(url);

var loader:Loader = new Loader();
loader.addEventListener(Event.COMPLETE, SuccessFunc); // Funcion q ejecuta cuando termina de cargar el XML
loader.addEventListener(IOErrorEvent.IO_ERROR, IOError);
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,SecurityError);

loader.load(urlReq); // Inicia la carga del XML
}



private function SuccessFunc(e:Event):void {// Funcion q ejecuta cuando termina de cargar el XML
if (e.target.data) { // Verifica si cargo el XML
_twitterXML = new XML(e.target.data); // Carga la Variable _twitterXML con elXML
}
trace("entro");
////////////////////
// PROCESA EL XML //
////////////////////


}

private function IOError(e:Event):void {
// handle error
}
private function SecurityError(e:Event):void {
// handle error
}

}

}

Por eze_ps

30 de clabLevel



 

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.