图片1是fbcdn-photos-a.akamaihd.net
Image 1 is at fbcdn-photos-a.akamaihd.net
图片2是fbcdn-sphotos-a.akamaihd.net
Image 2 is at fbcdn-sphotos-a.akamaihd.net
的跨域文件是相同的:
https://fbcdn-sphotos-a.akamaihd.net/crossdomain.xml
https://fbcdn-photos-a.akamaihd.net/crossdomain.xml
我可以加载图像拇指(这是在服务器1),但我不能加载完整图像(这是在服务器2)。我得到引发SecurityError:错误#2123:安全沙箱冲突
I can load image thumbs (which are on server 1), but I cannot load the full images (which are on server 2). I get SecurityError: Error #2123: Security sandbox violation.
2小时我一直在玩的LoaderContext设置的Security.allowDomain,并在Security.loadPolicyFile。没有给出。
For 2 hours I've been playing with LoaderContext settings, Security.allowDomain, and Security.loadPolicyFile. Nothing gives.
我也挣扎蒙山这个前几天......但所有的突然,它的工作由
I too was struggling whith this a few days ago... But the all of sudden, it worked by
加入这个地方的时候,我的应用程序inits:
adding this somewhere when my app inits:
Security.loadPolicyFile("http://graph.facebook.com/crossdomain.xml");
Security.loadPolicyFile("http://profile.ak.fbcdn.net/crossdomain.xml");
Security.allowDomain("*");
Security.allowInsecureDomain("*");
然后我用这个来得到的图片:
And then i used this to get the picture:
public function getProfilePicture():void {
var myLoader:Loader = new Loader();
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void {
pic.bitmapData = Bitmap(myLoader.content).bitmapData;
});
var fileRequest:URLRequest = new URLRequest("http://graph.facebook.com/" + this.uid + "/picture");
var lc:LoaderContext = new LoaderContext();
lc.checkPolicyFile = true;
myLoader.load(fileRequest, lc);
}
上一篇:Box2D的:如何获取静态物体的位置?物体、静态、位置、Box2D
下一篇:如何使用LDAP和PHP检索FRA一个Active Directory安全组的用户信息如何使用、用户信息、安全、LDAP