Sign in to follow this  
Superatons

facebook allows socket.io and express?

Recommended Posts

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

Share this post


Link to post
Share on other sites
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:

a.thumb.png.2227d18601fd0edfc736ec1240df7e7a.pngb.png.8ba5e049e774a0508c0e3b88a8104fff.png

Share this post


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>
<script>
  var socket = io('http://localhost');
  socket.on('connect', function(){});
  socket.on('event', function(data){});
  socket.on('disconnect', function(){});
</script>

 

And I can confirm it is working.

Maybe something else is the problem.

Share this post


Link to post
Share on other sites

 yes, something's got to be wrong but i don't notice it, everything works on localhost but when i upload it to facebook it's when the errors appear,I'm using this archives 
image.png.b1c69a1fb7016d58659ccff191db7f3c.png
an index i have this
image.png.1f5a684c077f8a53f33233ffa185f91d.png

socket.js
image.png.76281bb81efd641adeca2e4b530e405e.png

and app.js
image.png.ecb6d6a11be6e5e69da786db3a16356a.png
 

image.png

Edited by Superatons

Share this post


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.

Guest
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.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.