Foursquare API for Venue User Image Error

Foursquare venue image not displaying

In the venue details response there is a photos object under response['photos'] that contains an array of venue photos. To construct the photo url we have documentation here.

From the docs:

To assemble a resolvable photo URL, take prefix + size + suffix, e.g.
https://irs0.4sqi.net/img/general/300x500/2341723_vt1Kr-SfmRmdge-M7b4KNgX2_PHElyVbYL65pMnxEQw.jpg.

size can be one of the following, where XX or YY is one of 36, 100,
300, or 500.

  • XXxYY
  • original: the original photo's size
  • capXX: cap the photo with a width or height of XX (whichever is larger). Scales the other, smaller dimension proportionally
  • widthXX: forces the width to be XX and scales the height proportionally
  • heightYY: forces the height to be YY and scales the width proportionally

foursquare image URL returns Internal server error

As pointed by the comment from @Jonathan Levison you need to specify the "dimensions" between the prefix and suffix values. For example

https://irs0.4sqi.net/img/user/100x100/blank_boy.png

Getting picture from foursquare API

In case of category icon, 32, 44, 64, and 88 are available.

ref. https://developer.foursquare.com/docs/responses/category.html

e.g. https://ss3.4sqi.net/img/categories_v2/shops/conveniencestore_32.png

Foursquare API returns invalid avatar url?

Yeah, if you open the link via the browser you will see that you are getting "Internal Error".

This is the same issue as described here: Foursquare API for venue user image error

Which is caused by changes made to the API earlier this month.

You should register to this google group: https://groups.google.com/forum/#!topic/foursquare-api/MpNpdO5zARU



Related Topics



Leave a reply



Submit