Express Socket.io无法在fb和insta的应用程序浏览器上侦听
我们正在尝试使用前端带有React的passport.js与Express进行身份验证 我们遵循这一点以供参考 在这里,我们使用window.open在新窗口中传递套接字id,并在第一个窗口上侦听此io事件Express Socket.io无法在fb和insta的应用程序浏览器上侦听,express,oauth-2.0,socket.io,google-oauth,passport.js,Express,Oauth 2.0,Socket.io,Google Oauth,Passport.js,我们正在尝试使用前端带有React的passport.js与Express进行身份验证 我们遵循这一点以供参考 在这里,我们使用window.open在新窗口中传递套接字id,并在第一个窗口上侦听此io事件 openPopup() { const { provider, socket } = this.props const width = 600, height = 600 const left = (window.innerWidth
openPopup() {
const { provider, socket } = this.props
const width = 600, height = 600
const left = (window.innerWidth / 2) - (width / 2)
const top = (window.innerHeight / 2) - (height / 2)
const url = `${API_URL}/${provider}?socketId=${socket.id}`
return window.open(url, '',
`toolbar=no, location=no, directories=no, status=no, menubar=no,
scrollbars=no, resizable=no, copyhistory=no, width=${width},
height=${height}, top=${top}, left=${left}`
)
}
这在桌面和移动浏览器上运行得非常好。但它在应用程序内浏览器上不能作为窗口使用。open不能打开新窗口
在这种情况下,如何通过弹出窗口或重定向使用socket.io?。请帮我解决这个问题已经有一段时间了