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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With