Spotify 中的评论框

发布于 2024-12-28 18:49:36 字数 134 浏览 3 评论 0原文

我正在开发 Spotify 应用程序,我想为其添加评论框。我尝试过使用 Disqus 和 Facebook Commentbox,但这两种方法都不成功。现在我知道这应该是可能的,因为应用程序 Sounddrop 有一个聊天框。关于添加评论框有什么想法吗?

I'm working on an app for Spotify and I want to add a commentbox to it. I've tried to use Disqus and the Facebook Commentbox, but both methods weren't succesful. Now I know this should be possible, because the app Sounddrop has a chatbox. Any ideas on adding a commentbox?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

在你怀里撒娇 2025-01-04 18:49:36

我现在正在编写一个聊天服务器,并且使用 Brubeck 框架从头开始用 Python 编写了服务器。主要涉及以下几个方面。

  1. 创建您自己的服务器来管理保存和发布评论。
  2. 确保 Spotify 清单中包含您的 URL,以允许与您自己的外部服务器进行通信。
  3. 让 Spotify 应用程序聊天客户端通过长轮询技术与您的服务器进行通信,以实现实时更新。

我在 github 上有以下代码,但它仍在进行中。它应该让您了解需要做什么:

https://github.com/sethmurphy/Spotichat
https://github.com/sethmurphy/Spotichat-Server

我尝试让 Disqus 也能工作,理论上如果你设置了开发模式标志(在 Disqus 中),它应该可以工作;最终能够连接到服务器,但抛出了一个 JavaScript 错误,并且不会加载任何评论。

如果您还没有在清单中添加需要通信的 URL,那么您可以先尝试一下 Facebook,然后再从头开始编写服务器和客户端。查看检查器中的网络选项卡,查看是否有任何连接失败,并将这些连接的域添加到清单中。

I am writing a chat server now, and have written it all from scratch with the server in Python using the Brubeck framework. It basically involves the following.

  1. Create your own server to manage saving and publishing the comments.
  2. Make sure you have your URL in the Spotify manifest to allow communication to your own external server.
  3. Have the Spotify app chat client communicate with your server with a long polling technique to allow real time updates.

I have the following code on github, but it is still a work in progress. It should give you an idea of what needs to be done:

https://github.com/sethmurphy/Spotichat
https://github.com/sethmurphy/Spotichat-Server

I have tried to get Disqus to work also, and in theory it should if you have development mode flag set (in Disqus); it ended with being able to connect to the server, but a javascript error was thrown and none of the comments would load.

If you haven't added the URLs you need to communicate with in the manifest then you might give Facebook a try first before writing a server and client from scratch. Look at the network tab in the inspector to see if any connections are failing and add the domains for those to the manifest.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文