2

is there any way to get images from Google Plus album e.g. in JSON format. Regarding these topics:

the way is using the Picasa URL. This works perfectly but only for public albums

Using authkey in URL does not work. http: //picasaweb.google.com/data/feed/api/user/ ... user id ... /album/ ... album id ... ?authkey= ... auth key ... &alt=json

Does anyone have the solution for getting Google Plus album images where not public album is asked (using authkey).

Thank you.

Community
  • 1
  • 1
Phoca
  • 339
  • 2
  • 16

2 Answers2

2

You can authorize with google plus and then use its token to request albums from Picasa. To get the right permissions you should use gapi.auth.authorize method with the corresponding scope, which is https://picasaweb.google.com/data/

var googleClientToken = ''
var options = {
    client_id: googleClientId,
    scope: 'https://picasaweb.google.com/data/ https://www.googleapis.com/auth/userinfo.email'
}
gapi.auth.authorize(options, function() {
    googleAccessToken = gapi.auth.getToken().access_token
})

Then just fetch the url https://picasaweb.google.com/data/feed/api/user/USER_EMAIL/?kind=album&access_token=ACCESS_TOKEN&alt=json&access=all'

0

You can use the PicasaWeb GData API:

  • list all of a user's albums
  • identify the ID of the album you care about
  • fetch the data for that album using alt=json
ade
  • 4,056
  • 1
  • 20
  • 25