Integrate Linkshare and iTunes search in iOS
I use a URL like this to open iTunes from my iOS app, it works
itms://phobos.app开发者_Go百科le.com/WebObjects/MZSearch.woa/wa/search?WOURLEncoding=ISO8859_1&lang=1&output=lm&country=CA&term=Roisin Murphy You Know Me Better
However I am trying to use this with a Linkshare affiliate scheme by appending their ID to the start, like this
http://click.linksynergy.com/fs-bin/stat?id=YN9rqWEzn*U&offerid=162397&type=3&subid=0&tmpid=1826&RD_PARM1=itms://phobos.apple.com/WebObjects/MZSearch.woa/wa/search?WOURLEncoding=ISO8859_1&lang=1&output=lm&country=CA&term=Roisin Murphy You Know Me Better
I get no search results.
Can the iTunes search be used with Linkshare? Or do you have to directly link to the song, instead of searching?
Thanks!
According to this inside apps, one should use short links.
i got this working, and reported in linkshare after buying a song: var url='itms://phobos.apple.com/WebObjects/MZSearch.woa/wa/search?partnerId=30&siteID=<my 11 char ID>&term='+encodeURI(title)+'%20'+encodeURI(artist);
Note that this is javascript code, since i'm using Titanium Mobile, but you get the idea for native dev.
Also take into account, that as i mentioned in my comments, this will show no results if you're using a device that's not been enabled to buy in the itunes store. You can check this by just manually opening the appstore and searching for music. If you just get podcasts results or none at all then the same will happen from inside your app.
I've come to the conclusion that Linkshare don't support ITMS searches, only direct links to iTunes products....
Recognizable search queries for iTunes vary by device/desktop but your search query looks really odd. Try something like this:
http://ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=all&term=XXXXXXXXXXX
Take that query, replace the XXX with your search string, URL encode this a couple times, then concatenate it to your LinkShare URL and you should be golden.
Or, just make it really easy and use something like this -
http://www.georiot.com/resources/linking-formats/#search - where the affiliate encoding will work everywhere, not just US like you currently have.
精彩评论