Jump to content

facebook allows socket.io and express?

Recommended Posts

44 minutes ago, momcina said:

You should place socket.io.js in your project. And then link that file with relative path:


<script src="./socket.io/socket.io.js"></script>


This should work fine.

You can't reference .js files on some other server

a few minutes ago update the project and the localhost works but when uploading it to facebook the game does not load and this happens:


Link to post
Share on other sites

I have just try this example code from socketio github


<script src="/socket.io/socket.io.js"></script>
  var socket = io('http://localhost');
  socket.on('connect', function(){});
  socket.on('event', function(data){});
  socket.on('disconnect', function(){});


And I can confirm it is working.

Maybe something else is the problem.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...