Spotify + Facebook 集成 - 点击 Facebook 上的暂停按钮几乎会立即暂停我的本机 Mac 客户端。这是怎么做到的?
正如问题所读。如果我转到我的 FB 活动,它会显示正在播放的曲目和暂停按钮。如果我点击“暂停”,它会立即暂停我的本机 Spotify 应用程序。这是如何实施的?
Just as the question reads. If I goto my FB Activity, it shows the track that's being played and a pause button. If I hit "Pause" it pauses my native spotify app instantaneously. How is this implemented?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Facebook 网站上的 JavaScript 向 Spotify 托管的网络服务提交请求。我确实相信 Spotify 的客户端应用程序与 Spotify 的服务器保持连接。 Spotify 能够在客户端不提出请求的情况下向用户推送内容,因此该网络服务似乎就是这样做的。根据我的研究,我无法发现通过任何 API 方法开发类似的功能是可行的,无论是来自 Spotify 还是 Facebook。
The JavaScript on Facebook's site submits a request to a web service hosted by Spotify. I do believe that Spotify's client-side application maintains a connection with Spotify's servers. Spotify is able to push content to the user without the client making a request for it, so this web service seems to do this. From my research, I can't find that developing similar functionality is feasible via any API method, whether from Spotify or Facebook.
Spotify 嵌入了一个带有 Facebook 直接使用的远程控制 API 的网络服务器。
Spotify embeds a web server with a remote control API that Facebook uses directly.
Facebook 和 Spotify 有着特殊的合作关系。目前其他开发人员无法使用这种类型的集成。
Facebook and Spotify have a special partnership. This type of integration is not currently available to other developers.