如何根据对象获得foursquare用户的个人照片?[英] how to get profile pic for foursquare user based on the object

本文是小编为大家收集整理的关于如何根据对象获得foursquare用户的个人照片?的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

API文档中存在一些矛盾:

在一个位置: https://develoverer.foursquare.com/docsquare.com/docs/respons/respons/respons/user

照片应包含

>

在另一个位置进行尝试: 自我

照片是一个对象,有两个部分

正在返回内部错误.

如何获得用户的个人资料图片?

几天前

编辑:

还尝试在前缀和后缀之间添加我的computer_key,例如:

/hbvx4t2wqogg20fe.png

也给出了内部错误.

推荐答案

这是Foursquare在6月9日对API的变化的一部分. 请注意,Foursquare的AK宣布,他们将进行很多更改,有些将在即将到来的时间中记录下来,请在此处查看他的帖子: https://groups.google.com/forum/# !! topic/foursquare-api/mpnpdo5zaru

要修复,将" V"降低到20120609之前,使用20120608将起作用.它返回以下URL: a>适合您的用户:)

修复的另一种方法是使用[prefix]/oniginal/[suppix],然后您可以使用较新版本(> 20120609)

本文地址:https://www.itbaoku.cn/post/2090881.html

问题描述

There is some contradiction in the api documentation:

on one location: https://developer.foursquare.com/docs/responses/user

photo should contain "URL of a profile picture for this user.

on another location, trying it out: https://developer.foursquare.com/docs/explore#req=users/self

photo is an object, with two parts

https://irs3.4sqi.net/img/user/HBVX4T2WQOGG20FE.png is returning an Internal Error.

How can I get the profile pic of a user?

A couple of days ago the endpoint returned a string with the profile pic, now it has changed, but I can't find any documentation on that.

Edit:

Also tried adding my consumer_key between the prefix and suffix like:

https://irs3.4sqi.net/img/user/CONSUMER_KEY/HBVX4T2WQOGG20FE.png

Also gave an Internal Error.

推荐答案

This was part of a change foursquare did to the API on June 9th. Note that AK from foursquare announced that they will be making a lot of changes, some not fully documented in the coming time, see his post here: https://groups.google.com/forum/#!topic/foursquare-api/MpNpdO5zARU

To fix, lower the 'v' to before 20120609, using 20120608 will work. It returns the following URL: https://is0.4sqi.net/userpix_thumbs/HBVX4T2WQOGG20FE.png for your user :)

Another way to fix is to use the [prefix]/original/[suffix] and then you can use the newer version (>20120609)