在 iOS 中集成 Linkshare 和 iTunes 搜索
我使用这样的 URL 从我的 iOS 应用程序中打开 iTunes,它可以工作
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
但是我尝试通过将其 ID 附加到开头来将其与 Linkshare 附属方案一起使用,就像这样
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
我没有得到任何搜索结果。
iTunes 搜索可以与 Linkshare 一起使用吗?或者您是否必须直接链接到该歌曲,而不是搜索?
谢谢!
I use a URL like this to open iTunes from my iOS app, it works
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
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根据此 在应用程序内部,应该使用短链接。
我得到了这个工作,并在购买歌曲后在链接共享中报告:
var url='itms://phobos.apple.com/WebObjects/MZSearch.woa/wa/search?partnerId=30&siteID=&term='+encodeURI(title)+'%20'+encodeURI(artist);
请注意,这是 javascript 代码,因为我使用 Titanium Mobile,但您会了解本机开发的想法。
另请注意,正如我在评论中提到的,如果您使用的设备无法在 iTunes 商店中购买,则此将不会显示任何结果。您只需手动打开应用程序商店并搜索音乐即可检查这一点。如果您只获得播客结果或根本没有获得任何结果,那么您的应用程序内部也会发生同样的情况。
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.
我得出的结论是 Linkshare 不支持 ITMS 搜索,只支持 iTunes 产品的直接链接......
I've come to the conclusion that Linkshare don't support ITMS searches, only direct links to iTunes products....
iTunes 的可识别搜索查询因设备/桌面而异,但您的搜索查询看起来非常奇怪。尝试这样的事情:
http: //ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=all&term=XXXXXXXXXXX
获取该查询,将 XXX 替换为您的搜索字符串,对此进行 URL 编码几次,然后将其连接到您的 LinkShare URL,您应该就成功了。
或者,让它变得非常简单并使用这样的东西 -
http://www.georiot.com/resources/linking-formats/#search - 联盟编码将在任何地方工作,而不仅仅是像您目前所使用的那样。
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.