Twitter feed not exactly appearing in .swf
I'm trying to get the last post of a clients' Twitter feed embedded into a dynamic .swf file. I thought I had it and indeed if you go here it works:
http://204.12.3.54/twitter.swf
but then I embedded it into the page and now I get the .swf to appear but no feed!
http://h186498wp.setupmyblog.com/
It's supposed to connect to a php page that does the work and I'm enclosing it here. I do have crossdomain.xml set up properly. Anyone know why it doesn't connect on my page but it does by itself?
<?php
/*
* @return string
* @param string $url
* @desc Return string content from a remote file
* @author Luiz Miguel Axcar ([email protected])
*/
function get_content($url)
{
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, 0);
ob_start();
curl_exec ($ch);
curl_close ($ch);
$string = ob_get_contents();
ob_end_clean();
return $string;
}
#usage:
$content = get_content ("http://twitter.com/statuses/user_timeline.xml?screen_name=big_pearl");
echo $content;
?>
Yea, I can help you there
Here's the only AS3 code I'm using on the timeline:
var myXMLLoader:URLLoader = new URLLoader();
myXMLLoader.load(new URLRequest("twitter.php"));
myXMLLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(e:Event):void {
var myXML:XML=new XML(e.target.data);
tweet_1.text=myXML.status[0].text;
}
followMe_btn.addEventListener(MouseEvent.CLICK, onFollow);
function onFollow(e:MouseEvent):void{
navigateToURL(new URLRequest("http://twitter.com/big_pearl"));
}
Obviously, the onFollow function works. It's the processXML function that's the issue.