这段代码昨天还在运行
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错误(已折旧),并且现在在hereNow项中签入。我们被认证为一个管理我们正在查询的场所的页面,这样我们就可以看到所有的签到,而不仅仅是认证者的朋友,而且我们已经正常工作了,现在我们的面板上没有显示任何面孔,API也没有结果。
你知道是怎么回事吗?
发布于 2012-10-16 01:43:36
好了,终于明白了。照片的工作方式改变了,所以你需要前缀+照片的大小+后缀,所以这是我的最终代码,现在又开始工作了!
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" />');
});
});}
https://stackoverflow.com/questions/12845441
复制相似问题