2012-10-11 20 views
1

此代碼是工作昨天場地API - 此時此地不再經過檢查插件

var token = "<?php echo $token; ?>"; 
var venueId = "4bf42ccfe5eba593ba581f90"; 
var hereNowUrl = "https://api.foursquare.com/v2/venues/"+venueId+"/herenow?oauth_token="+token+"&limit=11&v=20121011"; 
$.getJSON(hereNowUrl, {format: "json"}, function(data) { 
     $(".who").empty(); 
     $.each(data.response.hereNow.items, function(i,hereNow){ 
     $(".who").append('<img src="'+hereNow.user.photo+'" alt="" class="userphoto" />'); 
     }); 
    }); 

但現在它只是返回200錯誤(貶值),現在辦理入住手續的在此時此地項目。我們被認證爲管理我們正在查詢的場所的頁面,以便我們看到所有登記信息,而不僅僅是身份驗證人的朋友,而且我們有這個工作,現在我們的董事會上沒有面孔出現,並且沒有結果API。

任何想法是怎麼回事?

+0

嗨詹姆斯,你可以跟進與您的特定用戶ID,venueid [email protected],而你看到的錯誤,以幫助調試問題。 – pfhayes

回答

0

好吧終於明白了。照片的工作方式發生了變化,所以您需要前綴+照片+後綴的大小,所以這是我的最終代碼,現在又重新開始了!

function getFourSquare(){ 
$.getJSON(hereNowUrl, {format: "json"}, function(data) { 
    $(".who").empty(); 
    $.each(data.response.hereNow.items, function(i,hereNow){ 
    $(".who").append('<img src="'+hereNow.user.photo.prefix+"100x100"+hereNow.user.photo.suffix+'" alt="" class="userphoto" />'); 
    }); 
}); 

}