如何基于对象获取Foursquare用户的个人资料照片 [英] how to get profile pic for foursquare user based on the object

查看:130
本文介绍了如何基于对象获取Foursquare用户的个人资料照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

api文档中存在一些矛盾:

There is some contradiction in the api documentation:

在一个位置: https://developer.foursquare.com/docs/responses/user

在另一个位置上进行尝试: https://developer.foursquare.com/docs/explore#req=users/自我

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

https://irs3.4sqi.net/img/user/HBVX4T2WQOGG20FE.png 返回内部错误.

如何获取用户的个人资料照片?

How can I get the profile pic of a user?

几天前,端点返回了一个带有配置文件pic的字符串,现在它已更改,但是我找不到关于它的任何文档.

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.

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

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

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

也给出了内部错误.

推荐答案

这是Foursquare在6月9日对API进行的更改的一部分. 请注意,foursquare的AK宣布将进行很多更改,其中一些更改将在未来一段时间内未完全记录,请参阅此处的帖子:

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

要解决此问题,请将'v'降低到20120609之前,可以使用20120608.它返回以下URL: https://is0.4sqi.net/userpix_thumbs/HBVX4T2WQOGG20FE.png为您的用户:)

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 :)

另一种解决方法是使用[prefix]/original/[suffix],然后可以使用较新的版本(> 20120609)

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

这篇关于如何基于对象获取Foursquare用户的个人资料照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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