When I try to request a token from Twitter:
_consumer = new OAuthConsumer( _consumerKey, _consumerSecret );
var oauthRequest:OAuthRequest = new OAuthRequest( "GET", AppConstants.TWITTER_REQUEST_TOKEN_URL, null, _consumer, null );
var request:URLRequest = new URLRequest( oauthRequest.buildRequest( _signature ) );
var loader:URLLoader = new URLLoader( );
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener( Event.COMPLETE, requestTokenHandler );
loader.load(request);
I get the following Security Error:
Security ERROR: [SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048: Security sandbox violation: http://localhost:3000/bin/testsite.swf cannot load data from http://twitter.com/oauth/request_token?oauth_consumer_key=....."]
Althought I have added the following:
Security.allowDomain("*");
Security.loadPolicyFile("http://twitter.com/crossdomain.xml");
The weird thing is that it doesn't happen when I run my App in Debug mode (from Flash Builder) it just happens when I call my application from localhot:3000 (as I'm using Rails)!
Any ideas?