Adding twitter on Unity (crossdomain.xml) problem

Hello,

I’m trying to add twitter to a Unity game. I allready downloaded the ‘Let’s tweet in Unity’ application from the asset store.

It does work when I pretend the unity3d file is hosted at twitter.com (see screenshot).
Unity will think twitter is being accessed from twitter.com (which works fine).

But I cannot put it on my own host because Unity will look at twitter.com/crossdomain.xml and won’t see permission for me to access twitter from my own domain.

Does anyone know a workaround so this will work: Unity accessing → My Host accessing → Twitter

What I need is some some kind of webservice as a layer between Unity and Twitter.

Below is a screenshot with a twitter test app which only works because I pretend the app to be hosted on twitter.com

Thanks for any help!

alt text

it works fine for android and pc standalone,but it doesn’t seem like working for the ios devices and mac standalone.

I think you need to rethink how crossdomain.xml works and where the end-result (.unity3d file) is stored/located/hosted.

From my knowledge, you cant upload a .unity3D file to any Twitter address, so you shouldn’t force the Unity editor to think its located on that domain.

The WWW security emulation is for development purpose, so you can test files locally before publishing them in real.

I guess you are building for a webplayer or? if so, you’ll need a domain to put that Unity file on. And on THAT domain where you put it, you’ll need to setup the crossdomain.xml file.

Secondly you can also put the webservice pulling/pushing the data to and from Twitter on that domain.

Crossdomain.xml

I think we need to clear up a bit on how this one works:
crossdomain.xml file tells which client-domains can access this one. Imagine if we had these two websites/domains: www.worldofwarcraft.com and www.eve-online.com

and I wanted a Unity webplayer client on those to be able to read from MY domain which could be www.awesomegame.com

Then I would put the two domains into the crossdomain.xml file. The resulting file could be something like this:

<?xml version="1.0" ?>
<cross-domain-policy>
   <allow-access-from domain="*.worldofwarcraft.com" />
   <allow-access-from domain="*.eve-online.com" />
   <allow-access-from domain="localhost" /> 
</cross-domain-policy>

… and then I would upload that in the root of my webhotel that hosts my domain www.awesomegame.com

Did this make any sense?