2

Google Plus アルバムから JSON 形式などで画像を取得する方法はありますか。これらのトピックについて:

その方法は、Picasa の URL を使用することです。これは完全に機能しますが、公開アルバムに対してのみです

URL で authkey を使用しても機能しません。http: //picasaweb.google.com/data/feed/api/user/ ... ユーザー ID ... /album/ ... アルバム ID ... ?authkey= ... 認証キー ... &alt= json

公開アルバムではない場所で (authkey を使用して) Google Plus アルバムの画像を取得するための解決策はありますか?

ありがとうございました。

4

2 に答える 2

2

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'

于 2015-07-14T20:59:00.037 に答える
0

PicasaWeb GData API を使用できます。

  • ユーザーのすべてのアルバムを一覧表示する
  • 気になるアルバムのIDを特定する
  • alt=json を使用してそのアルバムのデータを取得します
于 2013-08-22T12:15:25.007 に答える