2016-08-17 79 views
1

我需要谷歌提要API的幫助。我的前同事用EmbedPicasaGallery寫了一些javascript。您可以找到.md herePicasaweb和Google Feed API

他們使用長腳本。如果需要,我可以發佈它,但重點是Picasaweb提要API。

if (meta_opts.authkey){ 
      authkey = '&authkey=' + meta_opts.authkey; 
     } 

     if (meta_opts.albumid) { 
      showAlbum($this,meta_opts,meta_opts.albumid) 
     } 
     else { 
      $this.prepend($album_list); 
      $.getJSON('http://picasaweb.google.com/data/feed/api/user/' 
       + user + '?kind=album&access=visible' + authkey 
       + '&alt=json-in-script&thumbsize=' + meta_opts.size + 'c&callback=?', 
       renderAlbumList 
      ); 
     } 
    }; 

被打破(我的理解)的代碼是

$.getJSON('http://picasaweb.google.com/data/feed/api/user/' 
       + user + '?kind=album&access=visible' + authkey 
       + '&alt=json-in-script&thumbsize=' + meta_opts.size + 'c&callback=?', 
       renderAlbumList 
      ); 

我知道Picasa是慢慢dissapearing。當你登錄你現在得到了不同類型的網址:

https://get.google.com/albumarchive/NUMBERS/album/NUMBERSANDLETTERS 

而「昔日」你有

user/NUMBERS/album/NUMBERS 

如果我使用腳本連接的方式從輸入詳細信息新的方法我得到以下錯誤:

javascript error

何在,如果我離開了/專輯/ NUMBERSANDLETTERS這樣的:

https://picasaweb.google.com/data/feed/api/user/117827817825830816166/ 

我得到了用戶的相冊列表。

任何人都知道我可以如何整合新的方式來獲得舊的結果?

感謝, 托馬斯

回答

-1

我已經擴大由包括谷歌的照片我的搜索。我找到了一個解決方案here

Locate the album you wish to show. 
    1 Find a user profile on Google+ 
    2 Click "photos", such as: https://plus.google.com/+JustinLeeSG/photos 
    3 Choose an album, such as: https://plus.google.com/photos/112290004776472583114/albums/5995482558738492129 

從這裏開始我就知道下一步了。所以

+0

歡迎來到堆棧溢出!一個潛在的解決方案的鏈接永遠是受歡迎的,但請[添加鏈接上下文](// meta.stackoverflow.com/a/8259),這樣你的同行用戶就會知道它是什麼以及它爲什麼在那裏。如果目標網站無法訪問或永久離線,請始終引用重要鏈接中最相關的部分。考慮到_僅僅是一個鏈接到外部site_是一個可能的原因,因爲[爲什麼和如何刪除一些答案?](// stackoverflow.com/help/deleted-answers)。 – FrankerZ