Does Google Contacts API Support High Resolution Pictures? - google-plus

Google recently added high resolution support (720x720) for contacts' images via the gmail interface. Previously, it would to convert all images to 96x96. However, when I post an image using the Contacts API it still gets converted to 96x96. I currently use the picture url in the link ref http://schemas.google.com/contacts/2008/rel#photo. Is there a way to post higher resolution images or are we still stuck at 96x96 if we use the Contacts API? Is there another programmatic way to accomplish this?
Thanks!

I'm assuming that you are using the Google+ API to retrieve their profile and are looking at the profile image, as seen here using the API explorer:
https://developers.google.com/apis-explorer/#search/profile/m/plus/v1/plus.people.get?userId=107345380056943591322&_h=1&
In the response is an image URL:
"image": {
"url": "https://lh3.googleusercontent.com/-2N7UIsa-tLI/AAAAAAAAAAI/AAAAAAAAAK8/XJiZoMReZr0/photo.jpg?sz=50"
},
You can alter the sz parameter to indicate the width/height of the rendered image, for example:
https://lh3.googleusercontent.com/-2N7UIsa-tLI/AAAAAAAAAAI/AAAAAAAAAK8/XJiZoMReZr0/photo.jpg?sz=500
There are other url formats, it's not clear which url you are getting but if you paste an example, I'd be happy to help.

Related

Small Image Size by new Instagram API graph.instagram.com/me/media

I want to make a widget to display Instagram feed. Through graph.instagram.com/me/media?fields=caption,media_type,media_url,permalink,thumbnail_url&access_token=XXXXX I get the images. But in the widget I need a size of 150x150px.
oembed cannot be used, Limitations: https://developers.facebook.com/docs/instagram/embedding#limitations
Well, in a div size of 150x150px, an image of 800x1200 is also not needed.
How can I get other sizes?
The latest Instagram API doesn't have any ability to fetch an alternative size image on their basic display. It is possible to fetch a thumbnail URL using the oembed api, but this seems dev overkill.
The Instagram Basic Display API seems to be evolving, so this may be updated in the future.
For now, it seems that your only option is to always fetch the original sized images.

How to decode steam image url of thing?

Steam images have url like this:
http://steamcommunity-a.akamaihd.net/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulRNRULFV_eS1M7DQEh4IEtDt7ekOQYu1aOQcGgSutizwIPYw6-mYe-AzzhQ68Mj2rmRpd-g3gXm80s9Zm_2cZjVLFH7KrlnRw/330x192
In the API can find these string:
-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXQ9QVcJY8gulRNRULFV_eS1M7DQEh4IEtDt7ekOQYu1aOQcGgSutizwIPYw6-mYe-AzzhQ68Mj2rmRpd-g3gXm80s9Zm_2cZjVLFH7KrlnRw
Is there a way to decrypt it?
I believe that's off topic.
That's probably the image hash not the image itself.
You should then make a call to download said image the same way a browser to.
From the steam API docs:
img_icon_url, img_logo_url - these are the filenames of various images for the game. To construct the URL to the image, use this format: http://media.steampowered.com/steamcommunity/public/images/apps/{appid}/{hash}.jpg . For example, the TF2 logo is returned as "07385eb55b5ba974aebbe74d3c99626bda7920b8", which maps to the URL: [1]

Why are the preview thumbnails blank when I try to share on LinkedIn?

I have an article on the website I help maintain, that I want to share on LinkedIn, via the "Share an update" form on the site. The possible thumbnail images are being detected, and LinkedIn is receiving the correct urls for the images in question (they are served from Amazon's S3 service).
Inspecting the page, I see that a call is made by the page to https://www.linkedin.com/sharing/api/url-preview and the JSON response includes a "previewImages" field (under "data"."content") which is an array of objects/dicts with the fields "url", "mediaProxyUrl", "width", "height", and "size".
The "url" of my preview images is correct. Copying and pasting into the address bar brings it up. The "mediaProxyUrl" however does not load an image. The "size" field is null.
Using a working reference url (an article on another site), I can see that "mediaProxyUrl" is supposed to be linkedin's url for the thumbnail, and that "size" is supposed to be the file size of the original image.
So, why are my preview thumbnails blank? Is this a problem on LinkedIn's end? Is Amazon s3 the problem? I'm at a loss.
P.S. I've checked my og:image and og:image:secure_url headers, they're in order.
Try setting image's Content-type property in S3.

Incorrect image displayed when Gigya opens Google Plus share modal

I'm working with Gigya's Share Bar javascript api and am having an issue with google plus sharing. I have separate UserAction objects for facebook, twitter and google plus to display different text and linkbacks. I'm adding a media item (image) to the facebook and google plus actions to share that image along with the text. Facebook is sharing the correct image, however, google plus is displaying a different image. I have no idea where this image is coming from. Text and link are correct on both, but the image is frustratingly incorrect.
Has anyone encountered an issue like this? Is there something different that must be done for google plus shares?
Test your target URL with Google's structured data testing tool.
Read the snippet documentation to understand how the Google crawler determines what to use in the share preview.

Google Custom Search API Search Image by Image URL

I am working on an application which will have an option for users to upload images. Once uploaded, the application will show other images from the web which look exactly similar, whether or not of the same size.
For this, I will create a temporary URL for the image so that I could provide Google custom search API the URL of the image. I would expect in response, URL's of images that are exactly the same or similar to it, perhaps in JSON format.
I did find a similar question posted in January. Till then Google did not support anything like this, apparently:
Google Javascript Custom Search API: Search images by image url
One can also simply do:
http://images.google.com/searchbyimage?site=search&image_url={Image URL}
Since that is not part of an official API, it may not be right to use this method.
Can someone help me?
Well, the answer quite simply is TinEye Commercial API https://api.tineye.com/welcome. I was looking in the wrong place I guess, I did not have any luck with Google Custom Search API.
Would you need a simple result?
If you are, you can use Vision API of Google.
This is very simple.
https://cloud.google.com/vision/
You can try on the top.
First, access the URL.
Second, upload your image file on the "Try API"
Third, click "JSON" tab menu on the result.
You can be seen JSON about similar images.