我正在尝试使用 cloudboost 创建一个社交网站,但我不断收到此错误:
WebSocket connection to 'wss://realtime.cloudboost.io/socket.io/?EIO=3&transport=websocket&sid=PUsvsrEipNM0t6BGAALX' failed: Connection closed before receiving a handshake response
socket.io-1.4.5.js:1 POST https://realtime.cloudboost.io/socket.io/?EIO=3&transport=polling&t=LE0PghP&sid=PUsvsrEipNM0t6BGAALX 400 (Bad Request)
这是我的代码:
<!DOCTYPE html>
<html lang="en">
<head>
<title>CB</title>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="https://cloudboost.io/js-sdk/cloudboost.js"></script>
<script src="https://cdn.socket.io/socket.io-1.4.5.js"></script>
</head>
<body>
<script language="JavaScript" type="text/javascript">
CB.CloudApp.init('xxx', 'xxx');
</script>
</body>
</html>
'xxx' 当然被我的应用程序 ID 和客户端密钥替换。我尝试将某些内容存储到数据库中,但没有任何效果,只是一直显示该错误。