Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Ronald · May 23, 2011 at 08:22 AM · webservicetwittercrossdomain

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

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by crazyKnight · Aug 30, 2011 at 07:23 AM

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

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ina · Sep 18, 2011 at 10:11 AM 0
Share

wow seriously... there is no way to poll twitter from a unity web app?!

avatar image Recluse · Jan 19, 2012 at 02:46 PM 0
Share

After registering my app with Twitter, 'Let's Tweet In Unity' worked when running in the Unity Editor.

But when installed on the iPhone I get 'you need to register your app / game first'.

avatar image
0

Answer by BerggreenDK · Sep 18, 2011 at 10:16 AM

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?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image aren372 · Oct 09, 2012 at 08:30 AM 0
Share

I think it's denied by twitter's crossdomain.xml setting, rather than http://www.awesomegame.com's cross domain.xml.

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I login to twitter and make a post with specific text? 2 Answers

Why is Unity trying to get a crossdomain policy, even when trying to access a server on the same domain? 2 Answers

Error with Facebook's crossdomain file? 0 Answers

Post message to Twitter / Facebook app 1 Answer

Obtaining twitter user PIN directly in-app? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges