Image 从Google Plus相册获取图像-身份验证

Image 从Google Plus相册获取图像-身份验证,image,google-plus,photos,picasa,Image,Google Plus,Photos,Picasa,有没有办法从Google Plus相册中获取图像,例如JSON格式的图像。关于这些主题: 方法是使用Picasa URL。这非常有效,但仅适用于公共相册 在URL中使用authkey不起作用。 http://picasaweb.google.com/data/feed/api/user/。。。用户id/专辑/。。。相册id?authkey=。。。验证密钥&alt=json 有没有人能在要求不公开相册的情况下(使用authkey)获得Google Plus相册图像的解决方案 谢谢。您可以

有没有办法从Google Plus相册中获取图像,例如JSON格式的图像。关于这些主题:

方法是使用Picasa URL。这非常有效,但仅适用于公共相册

在URL中使用authkey不起作用。 http://picasaweb.google.com/data/feed/api/user/。。。用户id/专辑/。。。相册id?authkey=。。。验证密钥&alt=json

有没有人能在要求不公开相册的情况下(使用authkey)获得Google Plus相册图像的解决方案


谢谢。

您可以使用PicasaWeb GData API:

  • 列出用户的所有相册
  • 识别您关心的相册的ID
  • 使用alt=json获取该相册的数据

您可以向google plus授权,然后使用其令牌向Picasa请求相册。 要获得正确的权限,您应该使用具有相应作用域的
gapi.auth.authorize
方法,即
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
})
然后只需获取url
https://picasaweb.google.com/data/feed/api/user/USER_EMAIL/?kind=album&access_token=ACCESS_TOKEN&alt=json&access=all“