I have a Flex application that uses the Last.fm and Twitter api. After I uploaded the project to my webspace, the Twitter api call doesn’t work anymore, but the Last.fm still works. My url still works:
var getTweetsUrl = "https://api.twitter.com/1/statuses/user_timeline.xml?screen_name=deftonesband&count=3"
This is the code used for the httpservice:
<s:HTTPService id="getTweetsService" url="{getTweetsUrl}" result="displayTweets(event)" fault="twitterFail(event)" resultFormat="e4x" />
Every time the fault event is fired, even though the url is correct. Anyone knows of this problem?
due to crossdomain policy of twitter.com (https://api.twitter.com/crossdomain.xml) you are not able to invoke twitter api from other domain without permission (locally there is no crossdomain check in flash player)
to get permission from twitter user you have to use oAuth
I think easiest way to implement oAuth for twitter api is to use Open Source library for AS3 called Tweetr:
http://wiki.swfjunkie.com/tweetr