Join 3,494 readers in helping fund MetaFilter (Hide)


Looking for code to pull in Last.FM playlists into my site.
August 2, 2009 8:05 AM   Subscribe

I don't want to betray anyone's trade secrets here, but what is the html or js code or query string for pulling in playlists from Last.fm, as is done for us on our profile pages?

Been searching a bit here and on last.FM, and am not finding it. Also welcome any other resources that interact similarly with other social networking sites. Thanks?
posted by psmealey to Computers & Internet (9 answers total) 2 users marked this as a favorite
 
Have you tried View Page Source? You can find all kinds of HTML goodness with this trick.
posted by torquemaniac at 8:20 AM on August 2, 2009


Have you looked at this?:

Last.fm widgets
posted by backwards guitar at 8:23 AM on August 2, 2009


Just grab the RSS feed for the playlist and embed it in your page?
posted by COD at 8:25 AM on August 2, 2009


User.getRecentTracks? You'll need to apply for an API key, and some programming ability. Here's PHP, Perl, Python, or Ruby. You could also just grab the RSS feed, but where's the fun in that?
posted by motorcycles are jets at 8:27 AM on August 2, 2009


Great answers all. Thanks very much for the quick feedback.
posted by psmealey at 8:38 AM on August 2, 2009


Have you tried View Page Source? You can find all kinds of HTML goodness with this trick.

First thing I looked at. The MeFi profile page only shows only the return results. The widgets are also great, but I am not running WordPress on my site, so can't do much with them. Motorcyles are Jets has it: exactly what I was looking for. Thanks again.
posted by psmealey at 8:51 AM on August 2, 2009


I think you're looking for: Last.fm API
posted by namewithoutwords at 9:36 AM on August 2, 2009


There's an even easier way to do it without any real programming ability.

I use Feed Informer to create a "digest" from my Last.FM "Recent Tracks" RSS feed. Feed Informer pulls in an RSS feed and turns it into HTML, which can be included in your site's design using their provided JavaScript. I use the following HTML digest design on the Feed Informer backend:

%TITLE% <> %TIMEAGO,SHORT% <><><>

Then in my site's CSS, I added the following classes to change the way the Feed Informer logo and list items display:

.fdpoweredby, .rss-items, and .rss-item.

Pretty quick and easy!
posted by limeonaire at 11:21 AM on August 2, 2009


Hmm. On this line (%TITLE% <> %TIMEAGO,SHORT% <><><>), that first tag was meant to be a link tag around %TIMEAGO,SHORT%, pointing to URL %URL%; the two tags following were br tags.
posted by limeonaire at 11:23 AM on August 2, 2009


« Older American guy and British girl ...   |  GardenFilter: We just harveste... Newer »
This thread is closed to new comments.