Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Last.fm Favorite Artists For Social Network

DZone's Guide to

Last.fm Favorite Artists For Social Network

·
Free Resource
// Returns a list of your top 50 favorite artists from last.fm, suitable for pasting into a Facebook, Myspace, or similar profile


#!/usr/bin/env ruby
require 'net/http'
require 'csv'
user = 'nertzy'
csv = Net::HTTP.get 'ws.audioscrobbler.com', "/1.0/user/#{user}/topartists.txt"
puts CSV::Reader.parse(csv).collect{ |row| row[2] }.join(", ")
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}