Google Picasa Web Api: Get the private album

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 03:38:09

问题


I had so many albums in my picasa web, some of them are private. Now, I want to retrieve only those private album using the Google Picasa Web Api. I have read the documentation and found out that I need to make an authenticated request in order to gain access to private album.

With this url:

$url = 'http://picasaweb.google.com/data/feed/api/user/'.$username.'?kind=album&thumbsize=220c&access=private&max-results='.$list.'';

This returns an error that I'm not authorized to get the info/data.

Any help on how to get authenticated. There are PHP classes but for Zend Framework only which I don't have enough knowledge on it.

Thanks,


回答1:


If you have allready got an access token using the OAuth: http://code.google.com/intl/sv-SE/apis/accounts/docs/OAuth2.html

You have to append it to the url like &access_token={access token}

Hope it helps!




回答2:


You have to go through the authorization process and get an access token. There are several ways to do the authentication. I've used OAuth2 but for your purposes maybe ClientLogin will be easier. Check http://code.google.com/intl/es-419/apis/picasaweb/docs/2.0/developers_guide_protocol.html



来源:https://stackoverflow.com/questions/5714201/google-picasa-web-api-get-the-private-album

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!