Reputation: 11
I’m in the process of creating a freelance site. I’d like to be able to add a "currently listening to" (Track Name - Artist Name) <div>
/<ul>
section linked directly from Spotify showing the song that is currently being played.
I know this can be done via Last.fm and scrobbling, but I’m having a few issues getting it to work this way.
Any help would be much appreciated!
Upvotes: 1
Views: 585
Reputation: 3279
Unfortunately there is no API to do that. You will need to use Last.fm's API to fetch the listened tracks if the user enabled that feature in her Spotify client.
The other option would be to create a Spotify App that sends you that information, but the user would need to install it and keep it open while playing music, so your app subscribes to the event triggered every time there is a different track playing.
Upvotes: 1