dowb58485 2010-03-01 13:11
浏览 67
已采纳

检索Twitter用户信息在Flash中不起作用

I'm building a Twitter search application in Flash and have encountered a security error when retrieving a user's information using the following...

http://api.twitter.com/1/users/show.xml?screen_name=

I noticed a crossdomain.xml file returned with the above.

This works

http://search.twitter.com/search.atom?

Can anyone suggest a solution?

  • 写回答

1条回答 默认 最新

  • dtn55928 2010-03-01 14:33
    关注

    The cross domain policy for search.twitter.com permissive:

    <cross-domain-policy>
           <allow-access-from domain="*" />
    </cross-domain-policy>
    

    And for api.twitter.com it's quite restrictive:

    <cross-domain-policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.adobe.com/xml/schemas/PolicyFile.xsd">
      <allow-access-from domain="twitter.com" />
            <allow-access-from domain="api.twitter.com" />
            <allow-access-from domain="search.twitter.com" />
            <allow-access-from domain="static.twitter.com" />
            <site-control permitted-cross-domain-policies="master-only"/>
      <allow-http-request-headers-from domain="*.twitter.com" headers="*" secure="true"/>
    </cross-domain-policy>
    

    meaning that the only way to talk to api.twitter.com would be to call a script on your server and then proxy the request to twitter.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程