Google+ API for all photos

I did Google + authentication, and now I can access the user ID, access token, etc. I want to access custom personal and shared photos from google plus or picasa [everything works for me].

What API should I name? [Web application]

+4
source share
4 answers

There is currently no Google+ Photos API. At the moment, it’s best to use the Picasa Web API. For more information, see https://developers.google.com/picasa-web/

+2
source

Although there are no APIs, you can read the steps to find public posts with attached images. These messages will contain the full image URL that you can use to render / receive content in the message.

You can see what the answers look like from your public channel here:

https://developers.google.com/apis-explorer/#p/plus/v1/plus.activities.list?userId=me&collection=public&_h=1&

You would look for messages such as:

"verb": "post", "object": { "objectType": "note", "content": "Off the grid!", "url": "https://plus.google.com/109716647623830091721/posts/FH1rcTBiizW", "replies": { "totalItems": 0, "selfLink": "https://www.googleapis.com/plus/v1/activities/z13dwdcw1sy4ztf2p22uydqhrp34gx5np/comments" }, [....] "attachments": [ { "objectType": "photo", "displayName": "Off the grid!", "id": "109716647623830091721.5886945550216000274", "content": "6/7/13 - 1", "url": "https://plus.google.com/photos/109716647623830091721/albums/5886945550885266913/5886945550216000274", "image": { "url": "https://lh4.googleusercontent.com/-pGPWKUoUopE/UbKhyZyw8xI/AAAAAAAASsw/6aRt78UJlnc/w506-h750/photo.jpg", "type": "image/jpeg", "height": 750, "width": 506 }, "fullImage": { "url": "https://lh4.googleusercontent.com/-pGPWKUoUopE/UbKhyZyw8xI/AAAAAAAASsw/6aRt78UJlnc/photo.jpg", "type": "image/jpeg", "height": 4880, "width": 1456 } } ] 

},

In applications, you will see a fullImage link containing a link to a photo attached to the message.

Please note that photo albums will work differently.

+2
source

I used the Picasa API to get photos for my application, feel free to use it as a link. https://bitbucket.org/blackey02/city-log

0
source

Please note that for the Picasa API, there seems to be restrictions on cross origin if you want to upload images. Therefore, to download images you need to use the server / proxy or the auxiliary extension Chrome. (since they do not have the same cross-origin restrictions that the webpage code has - at least when the correct permissions are set in the manifest)

See an example solution here (in the Chrome extension): https://webapps.stackexchange.com/a/112527/147716

0
source

Source: https://habr.com/ru/post/1485178/


All Articles