how to get profile pic for foursquare user based o

2019-08-11 06:47发布

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.

标签: foursquare
1条回答
仙女界的扛把子
2楼-- · 2019-08-11 07:18

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)

查看更多
登录 后发表回答