how to get profile pic for foursquare user based on the object

别来无恙 提交于 2019-12-11 05:16:00

问题


There is some contradiction in the api documentation:

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

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

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.


回答1:


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)



来源:https://stackoverflow.com/questions/10967413/how-to-get-profile-pic-for-foursquare-user-based-on-the-object

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!