Torsten2217 / google-plus-platform

Automatically exported from code.google.com/p/google-plus-platform
0 stars 0 forks source link

People API - Profile photo image URL has unexpected default size #748

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When request is made in the People API, the object representing a user contains 
a profile photo image URL that contains the string "?sz=50" therefore setting a 
default size of the image.

The documentation says "To resize the image and crop it to a square, append the 
query string ?sz=x, where x is the dimension in pixels of each side". 

See 
https://developers.google.com/resources/api-libraries/documentation/plus/v1/pyth
on/latest/plus_v1.people.html#get

My understanding is that it is up to client to set this but its inclusion 
already in the response means we cannot simply append the query string.

My current workaround is to truncate the URL and re-append a size.

Steps to reproduce:
https://www.googleapis.com/plus/v1/people/me?fields=image&key={YOUR_API_KEY}

Original issue reported on code.google.com by blitza...@gmail.com on 19 Jan 2014 at 1:31

GoogleCodeExporter commented 9 years ago
It also works to add an additional sz parameter (but of course with & instead 
of ?) and the existing sz parameter will be ignored.

Example: 
https://lh3.googleusercontent.com/-khaIYLifQik/AAAAAAAAAAI/AAAAAAABcvM/_qhZ_7LyB
e4/photo.jpg?sz=50&sz=200

Original comment by scaryg...@gmail.com on 23 Jan 2014 at 12:20