Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link to an iTunes song / album from iPhone app

Tags:

iphone

itunes

I'm making an iPhone app for a band, which lists songs for the band. When the user touches a button next to a song, I want to open iTunes and display that song. Currently I'm using this code: [[UIApplication sharedApplication] openURL:[NSURL URLWithString: linkLocation]]; where linkLocation is a link to the song in iTunes. This works.

The problem I have is finding the link for a song. The links I get from the latest version of iTunes are different to the links I used to get in the previous version (by clicking on the dropdown arrow next to a song, and choosing "copy link"). If I use the link from the new version of iTunes, I get the error "Your request could not be completed" on my iPhone when I try to open that link through my app.

I've also tried using the Apple "itmsLinkMaker" site, and that doesn't work either.

like image 624
C. Lee Avatar asked Feb 11 '10 05:02

C. Lee


People also ask

How do I link to an iTunes song?

The quickest way to get a link is to Control-click or right-click on a song in the iTunes Music Store. A contextual menu pops up. Select Copy iTunes Music Store URL and simply paste the URL into an email or HTML page.

How can I share an album on iTunes?

Sharing Songs and Albums on Your ComputerOpen iTunes on your Mac or PC. Find the song or album that you want to share. Click the ellipsis (three dots) button to bring up the contextual menu. Hover your mouse pointer over Share Song/Album to see your sharing options.


1 Answers

Well it turns out Apple's itmsLinkMaker site does work - I must have been copying the links wrong.

Here's the link in case anyone else comes looking: http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/itmsLinkMaker

like image 146
C. Lee Avatar answered Oct 14 '22 04:10

C. Lee