Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Facebook Flex忽略策略文件_Facebook_Actionscript 3_Apache Flex_Twitter - Fatal编程技术网

Facebook Flex忽略策略文件

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. 该

我正在将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.
该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);