有没有办法从Google相册中获取图片,例如JSON格式的图片。关于这些专题:
方法是使用Picasa URL。这是完美的,但只适用于公共专辑。
在URL中使用authkey不起作用。http: //picasaweb.google.com/data/feed/api/user/ .用户id ./相册/ ..。专辑id . ?authkey= ..。奥斯键. &alt=json
有没有人有解决方案来获得谷歌加相册图像,而不是公开相册被要求(使用authkey)。
谢谢。
发布于 2015-07-14 20:59:00
您可以使用google授权,然后使用它的令牌从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'
发布于 2013-08-22 12:15:25
您可以使用PicasaWeb GData API:
https://stackoverflow.com/questions/18364103
复制相似问题