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
(Mysql, PHP) How to Get Auto_Increment Field Value Before Inserting Data
Vim Inoremap for Specific Filetypes
Laravel Named Route for Resource Controller
MySQL and PHP - Insert Null Rather Than Empty String
Warning: MySQL_Result() Expects Parameter 1 to Be Resource, Boolean Given
Round to Max Thousand, Hundred etc in PHP
How to Create Codeigniter Language Files from Database
How to Set 777 Permission on a Particular Folder
Permission Denied with Bash.Sh to Run Cron
Trying to Access Array Offset on Value of Type Null
Combine PHP Prepared Statments with Like
PHP Simplexml Attributes Are Missing
Invalid JSON Parsing Using PHP
How to Replace Double Quotes with Single Quotes
Design Patterns: How to Create Database Object/Connection Only When Needed
Extract a Substring Between Two Characters in a String PHP
How to Explain the Result for a New \Datetime('0000-00-00 00:00:00')