Facebook Flex忽略策略文件
我正在将facebook和twitter上的个人资料图像加载到flex应用程序中。根据答案,我正在从重定向的url加载域策略。但是,现在我看到了这个错误:Facebook Flex忽略策略文件,facebook,actionscript-3,apache-flex,twitter,Facebook,Actionscript 3,Apache Flex,Twitter,我正在将facebook和twitter上的个人资料图像加载到flex应用程序中。根据答案,我正在从重定向的url加载域策略。但是,现在我看到了这个错误: Error: [strict] Ignoring policy file at http://profile.ak.fbcdn.net/ due to missing Content-Type. See http://www.adobe.com/go/strict_policy_files to fix this problem. 该
Error: [strict] Ignoring policy file at http://profile.ak.fbcdn.net/ due
to missing Content-Type. See http://www.adobe.com/go/strict_policy_files
to fix this problem.
该URL中的crossdomain.xml文件如下所示:
<cross-domain-policy>
<allow-access-from domain="*" secure="false" to-ports="*"/>
<site-control permitted-cross-domain-policies="master-only"/>
</cross-domain-policy>
错误表明缺少内容类型。我该怎么做?一、 显然,无法更新facebook的文件
非常感谢您的帮助。根据您其他问题的代码:
request = new URLRequest("http://profile.ak.fbcdn.net");
loader = new Loader();
context = new LoaderContext();
context.checkPolicyFile = true;
loader.load(request, context);
您需要将URLRequest
设置为从加载,而不是仅从加载。如果您检查后一个请求返回的头(实际上应该失败),它不会发送任何内容类型
头。但是,该文件确实发送了一个适当的内容类型:text/xml
头
因此,您应该使用:
request = new URLRequest("http://profile.ak.fbcdn.net/crossdomain.xml");
loader = new Loader();
context = new LoaderContext();
context.checkPolicyFile = true;
loader.load(request, context);