x


Twitter crossdomain.xml not found?

I have been attempting to send a WWW request to Twitter in order to post an update. I am sending it to the URL "http://" + username + ":" + password + "@twitter.com/statuses/update.json", with username and password set to an account name and password. However, the request returns an error - it says no crossdomain.xml file was found. However it does appear to exist (at http://twitter.com/crossdomain.xml) Does anyone know what the problem is here?

more ▼

asked Nov 15 '10 at 01:05 PM

Ben 15 gravatar image

Ben 15
3 4 5 5

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

The crossdomain.xml that Twitter has on their site is:

<?xml version="1.0" encoding="UTF-8"?> 
<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>

So unless you access http://twitter.com from a Web player that is hosted from http://twitter.com, http://api.twitter.com, http://search.twitter.com or http://static.twitter.com (or *.twitter.com), it simply won't work.

So, what you'll have to do to access Twitter from a Web player is to write a Web service that reads the data for you, hosted on your own server. Then, on that server, you can provide access via a crossdomain.xml that has your Web player location in the "allow-access-from"-list.

more ▼

answered Feb 07 '11 at 03:47 PM

jashan gravatar image

jashan
10.3k 25 43 117

So basically what you're saying is, normal people who don't have our own servers can't trivially post to twitter. :( Boooo.

Aug 07 '11 at 11:35 PM Ipsquiggle
(comments are locked)
10|3000 characters needed characters left

This is related to the new security model that was added to Unity 3.0. You can read more about it here: http://unity3d.com/support/documentation/Manual/Security%20Sandbox.html

Basically in order for you to be able to access a resource on a server via Unity (in your case http://twitter.com), that server's crossdomain.xml would have to specify an all access '*' in order for the request to be successful via Unity.

more ▼

answered Dec 20 '10 at 09:21 PM

heks gravatar image

heks
76 3

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x548
x20

asked: Nov 15 '10 at 01:05 PM

Seen: 1620 times

Last Updated: Aug 07 '11 at 11:35 PM