如何链接到正确的urlencode spotify搜索

问题描述:

某人似乎改变了如何链接到Spotify搜索。下面的代码应该工作:如何链接到正确的urlencode spotify搜索

<a href="spotify:search:track:castle+on+the+hill+artist:ed+sheeran">spotify:search:track:castle on the hill artist:ed sheeran</a> 

当Spotify的打开它说未找到结果“追踪:城堡+上+中+希尔+艺术家:ED +希兰”

我们也尝试百分号编码:

<a href="spotify:search:track:castle%20on%20the%20hill%20artist:ed%20sheeran">Castle on the hill Ed Sheeran</a> 

但是这也失败了。

有关如何正确链接到Spotify搜索的任何建议?

我想通了,这里的解决方案张贴 https://pappmaskin.no/2017/02/linking-to-a-spotify-search-with-both-track-and-artist/

没有为URL的新格式:

track:"castle on the hill" artist:"ed sheeran" 

而且你需要单独进行urlencode那一部分,以

track%3A%22castle%20on%20the%20hill%22%20artist%3A%22ed%20sheeran%22. 

并添加spotify:搜索:在前面: spotify:搜索:track%3A%22castle%20on%20the%20hill%22%20artist%3A%22ed%20sheeran %22