如何从 iPhone 应用程序链接到 iTunes 商店?
我正在尝试建立一个应用程序,用户可以在其中 流媒体音乐。当用户播放 MP3 时,我想设置一个 iTunes 商店的链接来购买 MP3。
我怎样才能做到这一点?我觉得应该有一些简单的方法可以使用歌曲标题和艺术家姓名来做到这一点,我错了吗?
谢谢
I am trying to set up an application in which users will be able to stream music. When the user is streaming a MP3, I'd like to set up a link to the iTunes store to buy the MP3.
How can I do that? I feel like there should be some simple way of doing so using the song title and artist name, am I mistaking?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以尝试使用 iTMS 链接制作工具 Apple 提供并查看链接是如何形成的。此外,这里是 iTMS Link Maker 常见问题解答。
有关如何自动查询 iTMS 链接制作工具的信息,请参阅此博文。基本上,您可以查询 iTMS Link Maker 并获取您的应用程序可以处理的 XML 文档。
You can experiment with the iTMS Link Maker that Apple provides and see how the links are formed. In addition, here is the iTMS Link Maker FAQ.
See this blog post about how to query the iTMS Link Maker automatically. Basically, you can query the iTMS Link Maker and get an XML document back that your application can process.
iTunes Store Web Service Search API (pdf),尽管已过时且不完整,记录了如何在 iTunes 商店中搜索内容并返回带有结果的 JSON 字符串。
查询被发送到基本 url:
The iTunes Store Web Service Search API (pdf), although old and incomplete, documents how to search for content in the iTunes store and returns a JSON string with results.
Queries are sent to base url:
好吧,我也遇到了同样的问题,这里的答案没有给我足够的信息。于是我用不同的措辞再次问了这个问题,并继续寻找答案。我最终在另一个问题中回答了我自己的问题,并在那里发布了执行此操作的代码。
您可以在以下位置找到问题:
打开 iTunes Store 来播放特定歌曲
它包含打开 iTunes Store 并找到由歌曲名称和歌曲艺术家指定的特定歌曲所需的所有代码。
我希望这对某人有帮助。
Ok, I had this same problem and the answers here did not give me enough info. So I asked this question again with different wording, and continued to search for an answer. I ended up answering my own question in the other question, and have posted the code to do this over there.
You can find the question at:
Opening iTunes Store to specific song
It contains all the code you will need to open the iTunes Store to the specific song specified by song name and song artist.
I hope this helps someone.
创建到应用程序商店的链接可能会遇到很大问题。我建议您使用一个名为 iLink 的简单库,这是我在搜索此问题的解决方案时发现的。它会弄清楚一切并创建您需要的始终有效的链接。另一个很棒的事情是它非常易于使用。
Creating a link to the app store could be very problematic. I suggest you use a simple library called iLink that I found when searching for a solution for this exact issue. It would figure out everything and create the link you need that would work always. Another great thing is that it is super easy to use.