mhgbrg / personal-website

My personal website and blog. Uses a script that parses posts from Markdown files and spits out static html.
0 stars 1 forks source link

Use the Last.fm API to show current playing song on Spotify #87

Open mhgbrg opened 8 years ago

mhgbrg commented 8 years ago

Spotify currently doesn't have any endpoint for fetching the currenty playing track for a user. Though a workaround is to connect your Spotify account to Last.fm and use their API. See http://www.last.fm/api/show/user.getRecentTracks.

mhgbrg commented 8 years ago

To link to the song, use the Spotify search API to search for the artist and the song name, and take the first hit.

daviaugustos commented 7 years ago

@mhgbrg Firstly, thanks for sharing this solution with us. For curiosity, what do you do to gets te currently song? Are you get the first position of api 's request?