如何获得应用商店中显示的喜欢的数量

时间:2013-01-19 03:50:22

标签: ios facebook ios6

我想知道是否存在获取App Store或Game Center中显示的喜欢数量的方法。 通过这种方式,我可以检查用户是否真的喜欢我在Facebook上的应用程序。

谢谢!

2 个答案:

答案 0 :(得分:1)

使用http-get,您可以查看应用的iTunes页面。例如对于愤怒的小鸟里约:https://itunes.apple.com/us/app/angry-birds-rio/id420635506?mt=8&ign-mpt=uo%3D2

然后,如果您想了解总评分,请尝试将字符串拆分为相关部分:

<div class='extra-list customer-ratings'>
<h4>Customer Ratings</h4>
<div>Current Version:</div>
<div class='rating' role='img' tabindex='-1' aria-label='4 and a half stars, 3113 Ratings'><div><span class="rating-star">&nbsp;</span><span class="rating-star">&nbsp;</span>    <span class="rating-star">&nbsp;</span><span class="rating-star">&nbsp;</span><span class="rating-star half">&nbsp;</span></div><span class="rating-count">3113 Ratings</span>

答案 1 :(得分:1)

您应该使用iTunes查找API来获取JSON格式化结果中所需的信息:
http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html

你应该为愤怒的小鸟里约使用的链接看起来像这样:
http://itunes.apple.com/lookup?id=420635506

{
    "resultCount":1,
    "results":[
        {
             "artistId":298910979,
             "artistName":"Rovio Entertainment Ltd",
             ...
             "averageUserRating":4.5,
             "averageUserRatingForCurrentVersion":4.5,
             ...
相关问题