如何嵌入所有Facebook页面照​​片?

时间:2015-07-22 00:30:31

标签: facebook facebook-graph-api embed photo

我想将我的Facebook页面上发布的所有照片嵌入到我的网站上。

使用Galleria我设法将我的Facebook页面中的相册嵌入到我的网站上,但我想将所有照片嵌入到一个库中。这比在同一网页上显示多个相册要清晰得多,并且省去了每次上传新的ablum时都必须改变脚本的麻烦。 在Facebook上,当您单击横幅照片下方的照片选项卡时,您将获得两个选项,即照片和相册。这是照片部分中的照片,这是我想要嵌入到一个画廊的所有照片。

这是我运行的页面中的照片部分。 Photos section on Facebook page

该流中的第一张照片的网址为 - .... / photos / pb.394061020620308.-2207520000.1437521944。/ 1131415663551503 /?type = 3

我已经设法开始工作的专辑的网址为 - .... /照片/ a.1125399300819806.1073741845.394061020620308 / 1125399444153125 /?类型= 3

Galleria的说明指出a之后的17位数字。是专辑ID号,这是我用来使单张专辑发挥作用的。对于我设法开始工作的专辑,这是1125399300819806。

网址末尾的15位数字是当前显示的照片的ID。在我给出的例子中,这是1125399444153125或1131415663551503。

我尝试过使用394061020620308 - 这已成为网页个人资料相册的相册ID。

我也试过了 -

394061020620308
-2207520000
2207520000
1437518966
2207520000.1437518966
-2207520000.1437518966
394061020620308.1437518966
394061020620308.-2207520000
394061020620308.2207520000

但我没有运气。任何人都可以提出任何可行的建议吗?

或其他可行的脚本? 或者其他可以使用的服务?

由于

1 个答案:

答案 0 :(得分:0)

不确定我是否理解正确,但要获取相册ID列表,您可以通过Graph Explorer查询Graph API:

https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=LUUCCkayak%2Falbums

通过发出/LUUCCkayak/albums电话,我收到以下结果:

{
  "data": [
    {
      "name": "Timeline Photos",
      "created_time": "2012-02-27T10:51:18+0000",
      "id": "396826650343745"
    },
    {
      "name": "Christie Cup 2015",
      "created_time": "2015-05-17T20:52:06+0000",
      "id": "1125399300819806"
    },
    {
      "name": "Welsh Weekend 2015",
      "created_time": "2015-05-14T15:03:44+0000",
      "id": "1123618930997843"
    },
    {
      "name": "Mobile Uploads",
      "created_time": "2014-02-13T17:33:54+0000",
      "id": "827630280596711"
    },
    {
      "name": "Semester 2 Inter trips",
      "created_time": "2015-04-01T16:50:13+0000",
      "id": "1096724827020587"
    },
    {
      "name": "Salford Polo 28/02/2015",
      "created_time": "2015-03-03T19:54:40+0000",
      "id": "1079617935397943"
    },
    {
      "name": "Snowboating + a little Tees",
      "created_time": "2015-02-01T23:23:59+0000",
      "id": "1061377837221953"
    },
    {
      "name": "Lakes Weekend 2015",
      "created_time": "2015-01-26T13:29:26+0000",
      "id": "1057442500948820"
    },
    {
      "name": "Upper Tees day!!!!!",
      "created_time": "2014-12-07T20:07:37+0000",
      "id": "1020096474683423"
    },
    {
      "name": "Dee Day",
      "created_time": "2014-11-24T08:19:21+0000",
      "id": "1010340185659052"
    },
    {
      "name": "LUUCC go to the Middle Tees",
      "created_time": "2014-11-16T21:35:21+0000",
      "id": "1005981122761625"
    },
    {
      "name": "Leven and Kent Day",
      "created_time": "2014-11-10T18:55:55+0000",
      "id": "1001793183180419"
    },
    {
      "name": "Profile Pictures",
      "created_time": "2012-02-23T18:24:13+0000",
      "id": "394220000604410"
    },
    {
      "name": "Cover Photos",
      "created_time": "2012-03-15T23:53:44+0000",
      "id": "409649069061503"
    },
    {
      "name": "LUUCC goes to the Tyne Tour",
      "created_time": "2014-11-03T12:52:22+0000",
      "id": "997087716984299"
    },
    {
      "name": "LUUCC go to the Lune",
      "created_time": "2014-10-28T00:04:16+0000",
      "id": "992887274071010"
    },
    {
      "name": "Wharfe Day",
      "created_time": "2014-10-13T14:26:00+0000",
      "id": "983636668329404"
    },
    {
      "name": "LUUCC @ The Burrs",
      "created_time": "2014-10-05T22:46:24+0000",
      "id": "977730608920010"
    },
    {
      "name": "Faces of LUUCC 2014/15",
      "created_time": "2014-09-28T21:43:52+0000",
      "id": "972949889398082"
    },
    {
      "name": "LUUCC Do: BUCS Slalom 2014",
      "created_time": "2014-02-15T23:37:09+0000",
      "id": "828915663801506"
    },
    {
      "name": "LUUCC Do: Tyne Tour 2013",
      "created_time": "2013-11-04T12:47:44+0000",
      "id": "762842167075523"
    },
    {
      "name": "LUUCC do: Surfing",
      "created_time": "2013-10-13T20:54:23+0000",
      "id": "748712981821775"
    }
  ],
  "paging": {
    "cursors": {
      "after": "NzQ4NzEyOTgxODIxNzc1",
      "before": "Mzk2ODI2NjUwMzQzNzQ1"
    }
  }
}