本文介紹了如何將 Facebook 相冊集成到網站中?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
可能的重復:
Facebook Api - 如何訪問我的相冊
如何在網站內顯示 Facebook 相冊中的照片?
How can I display photos from a Facebook album inside a website?
推薦答案
您可以使用圖形 api 來獲取相冊中的圖像,如下所示:https://graph.facebook.com/ALBUM_ID/photos您將獲得一個包含該相冊中所有圖像的數組.該數組包含這樣的對象:
You can use the graph api to get the images in an album, like this: https://graph.facebook.com/ALBUM_ID/photos You get an array containing all the images in that album. The array contains objects like this:
"name": "hopes you're having a great weekend!",
"picture": "http://photos-d.ak.fbcdn.net/hphotos-ak-snc1/5370_127826373305_40796308305_2373079_2781005_s.jpg",
"source": "http://a4.sphotos.ak.fbcdn.net/hphotos-ak-snc1/5370_127826373305_40796308305_2373079_2781005_n.jpg",
"height": 604,
"width": 427,
"images": [
{
"height": 604,
"width": 427,
"source": "http://a4.sphotos.ak.fbcdn.net/hphotos-ak-snc1/5370_127826373305_40796308305_2373079_2781005_n.jpg"
},
{
"height": 254,
"width": 180,
"source": "http://photos-d.ak.fbcdn.net/hphotos-ak-snc1/5370_127826373305_40796308305_2373079_2781005_a.jpg"
},
{
"height": 130,
"width": 91,
"source": "http://photos-d.ak.fbcdn.net/hphotos-ak-snc1/5370_127826373305_40796308305_2373079_2781005_s.jpg"
},
{
"height": 106,
"width": 75,
"source": "http://photos-d.ak.fbcdn.net/hphotos-ak-snc1/5370_127826373305_40796308305_2373079_2781005_t.jpg"
}
],
這是 api 文檔中的一個示例.您可以直接使用這些圖片鏈接,Facebook 甚至會為您提供不同尺寸的圖庫.祝你好運.
This is an example from the api documentation. You can use these image links directly, facebook even gives you different sizes for the gallery. Good luck.
這篇關于如何將 Facebook 相冊集成到網站中?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!