- Home /
Socket.io Facebook connetion problem
Hi,
I am having a problem with connection Socket.io over Facebook canvas. I am using same codes and crossdomain policy for ios, and android, and both are working fine. Although, on the webplayer on facebook, i can make handshake with one of my internet provider and i cannot make with second one. I have tried to use different internet connections, different pc, and different internet providers and most of them gives me crossdomain policy error.
I have set up crossdomain.xml file. I am using also webapi to make login and the rest for the game and all of them working fine. This shows crossdomain.xml works. But when i try to connect to socket it doesn't.
Can this be because of changing https protocol to http? Because socket.io is working over http. Or do i need to add some more on socket.io side to make it work also in Facebook?
Does anyone else also had this situation and fix it?
Note: I am running Unity's Socket Policy Server on the server and it allows ios users to make handshake with socket.io.
Note 2: Socket.io version is 0.9.6 and Unity version is 4.6
Note 3: I am adding error log just if you want to see.
System.Security.SecurityException: Unable to connect, as no valid crossdomain policy was found\r\n at System.Net.Sockets.Socket.Connect_internal (IntPtr sock, System.Net.SocketAddress sa, System.Int32& error, Boolean requireSocketPolicyFile) [0x00000] in <filename unknown>:0 \r\n at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0 \r\n at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0 \r\n at System.Net.Sockets.TcpClient.Connect (System.Net.IPEndPoint remote_end_point) [0x00000] in <filename unknown>:0 \r\n at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress[] ipAddresses, Int32 port) [0x00000] in <filename unknown>:0