2017-02-07 35 views
1

某人似乎改變了如何鏈接到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搜索的任何建議?

回答

0

我想通了,這裏的解決方案張貼 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