Forum QuickConnect Facebook / crossdomain.xml weirdness

Discussion and help relating to PlayerIO's QuickConnect feature, including Facebook Connect and Kongregate Connect.

Facebook / crossdomain.xml weirdness

Postby MentalFish » October 26th, 2012, 11:03 pm

I am trying to connect to Facebook in a Unity based game. I am using GameFS to host the .unity3d file alongside the index.html file on your server. I manage to get an AccessToken from Facebook via their JavaScript SDK and sending it in to Unity with the SendMessage() function. When trying to connect via QuickConnect, I get this error message:
GeneralError: Rejected because no crossdomain.xml policy file was found


This is the code for that section:
Code: Select all
public void FacebookConnect(string playerIoGameId, string accessToken)
{
   MFConsole.WriteLine("Trying to connect to Facebook"); // This show as stated
   facebookAccessToken = accessToken;
   MFConsole.WriteLine(facebookAccessToken); // This one show a long AccessToken
   PlayerIO.QuickConnect.FacebookOAuthConnect
   (
      playerIoGameId,
      facebookAccessToken,
      null,
      delegate(Client incomingClient)
      {
         playerIoClient = incomingClient;
         MFConsole.WriteLine("PlayerIO -> Facebook login success!");
         panelStartScreen.SlideLeft();
      },
      delegate(PlayerIOError error)
      {
         MFConsole.WriteLine(error.Message); // GeneralError: Rejected because no crossdomain.xml policy file was found
      }
   );
}


Is your crossdomain.xml file saved as ASCII?
From Unity's own site:
The Unity webplayer does not support the <allow-http-request-headers-from domain> and <site-control permitted-cross-domain-policies> tags. Note that crossdomain.xml should be an ASCII file.

http://docs.unity3d.com/Documentation/M ... ndbox.html

Got any thoughts?

Edit: This only happens when the game runs via https. Regular http seems to work fine, but still, would be nice to get https working as well. Also, this is when I go into my Security Settings of my account and disable Secure Browsing on Facebook, and I can't ask my players to do that :)
User avatar
MentalFish
 
Posts: 16
Joined: October 31st, 2011, 6:52 am

Re: Facebook / crossdomain.xml weirdness

Postby Benjaminsen » October 29th, 2012, 3:00 pm

You should be able to dump in your own crossdomain.xml file into your root folder of your Sitebox site.
Currently we just service you a simple default one if you do not declare one.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Facebook / crossdomain.xml weirdness

Postby MentalFish » October 31st, 2012, 4:02 pm

This issue has now been fixed by the guys at PlayerIO. Great job and thanks a bunch!

I am not sure what was done backend wise, but it works as expected :)
User avatar
MentalFish
 
Posts: 16
Joined: October 31st, 2011, 6:52 am

Re: Facebook / crossdomain.xml weirdness

Postby Benjaminsen » October 31st, 2012, 4:08 pm

We did some changes to how we serve crossdomain.xml files for unity games. Thanks for your help debugging this issue!
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark


Return to QuickConnect