Foursquare API 用于场地用户图像错误 [英] Foursquare API for venue user image error

查看:27
本文介绍了Foursquare API 用于场地用户图像错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Foursquare API 将用户的照片标签分为前缀和后缀.但是,如果我将它们合并以形成一个完整的图像 URL 并将其粘贴到我的浏览器中,则会出现错误,提示图像无法显示,因为它包含错误.是因为服务器暂时不可用还是其他原因?

The Foursquare API has divided its photo tag for user as prefix and suffix. But if I merge them to form a full image URL and paste this in my browser, gives me errors that says the image can't be displayed because it contains errors. Is it because server is temporarily unavailable or anything else?

我使用 API 获取场地详情.

I am using the API for Venue Detail.

我得到的数据是这样的

user: {

id: "26534686"
firstName: "Bobbi"
lastName: "E."
photo: {
    prefix: "https://irs3.4sqi.net/img/user/"
    suffix: "/K4VCI4MXHWFUGXOF.jpg"
}
}
visibility: "public" 

但是当我调用这个 url https://irs3.4sqi.net/img/user/K4VCI4MXHWFUGXOF.jpg 给我错误.

But when I call this url https://irs3.4sqi.net/img/user/K4VCI4MXHWFUGXOF.jpg gives me error.

有什么线索吗?

推荐答案

我不知道是否应该展示通往 Foursquare 的道路.但是我调查过 Foursquare 创建的缩略图大小为 30 x 30 和 110 x 110 等.

I don't know its right or not to show the way to Foursquare. But what I have investigated that Foursquare creates thumbnails of sizes 30 x 30 and 110 x 110 etc.

我像这样形成了图像路径对于小图像

I formed the image path like this for small image

user->photo->prefix.'30x30'.user->photo->suffix;

大尺寸

user->photo->prefix.'110x110'.user->photo->suffix;

也就是说,我将它们与 (30x30) 和 (110x110) 连接起来.

That is I have concatenated them with (30x30) and (110x110).

这样上图就变成了https://irs3.4sqi.net/img/user/30x30/K4VCI4MXHWFUGXOF.jpghttps://irs3.4sqi.net/img/user/110x110/K4VCI4MXHWFUGXOF.jpg 至今有效.

Thus the above image becomes https://irs3.4sqi.net/img/user/30x30/K4VCI4MXHWFUGXOF.jpg and https://irs3.4sqi.net/img/user/110x110/K4VCI4MXHWFUGXOF.jpg which are valid till now.

希望这能奏效,直到他们改变这一点.

Hope this will work until they change this.

这篇关于Foursquare API 用于场地用户图像错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆