获取使用Facebook的API页面的所有照片 [英] Get all photos of a page using Facebook API

查看:339
本文介绍了获取使用Facebook的API页面的所有照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来Facebook的API,但我不得不从一个Facebook页面获得的所有照片。我得到了一个图形API查询,返回的所有图片只有第一个有史以来专辑这是资料图片专辑在页面上。例如:

I am new to Facebook API but I have to get all photos from a Facebook page. I managed to get a graph api query that returns all pictures of only the first ever created album on the page which is the profile picture album. For example:

https://graph.facebook.com/227843870675663/photos

不过,我需要做的在页面上所有其他现有的专辑一样。任何指针真的AP preciated。

But I need to do the same for all other existing albums in the page. Any pointers are really appreciated.

推荐答案

试试这个,让我知道如何去对你,我已经成功地拉的所有照片。

try this and let me know how it goes for you, I've successfully pulled all photos.


  1. 确保您的Facebook主页的管理员。

  1. Ensure that you are an Admin of the Facebook Page.

请访问:
<一href=\"http://developers.facebook.com/tools/explorer\">http://developers.facebook.com/tools/explorer

在API浏览器中,你可以看到的/我将弹出自己的基本信息。

In the API Navigator, you can see "/me" will bring up the basic information of yourself.

试着键入的 ,查看你是否能看到什么。它应该给你一个错误。

Try typing in "/me/accounts" to see if you can see anything. It should give you an error.

点击上的获取访问令牌

一个窗口会弹出。导航到扩展权限

a window will pop-up. Navigate to "Extended Permissions"

选择manage_pages

点击获取访问令牌

现在尝试的 一次。您应该看到观景窗内页的列表。

Now try "/me/accounts" again. You should see a list of Pages inside the viewing window.

选择您想要的页面,然后单击身份证字段

Select the Page you want, and click on the "id" field

接下来,在左边窗口中,你可以看到的节点 + 登录。点击+号,看看有什么是你的选择。

Next, on the left window, you can see "Node: " and a + sign. Click on the + sign to see what are the options you have.

点击+号,向下滚动到连接,并选择相册

Click on the + sign and scroll down to "connections" and select "Albums"

孩子级别,选择照片

照片子级,选择

现在点击提交在右侧。你会看到一个JSON在您选择的Facebook页面中的所有照片的URL返回。

Now click "Submit" on the right hand side. You will see a JSON returned with the url of all the photos in your selected Facebook Page.

复制该网址 - <一个href=\"https://graph.facebook.com/\">https://graph.facebook.com/?fields=albums.fields(photos.fields(source))然后将其插入您的浏览器。您应该看到您的所有照片的JSON和Facebook的CDN其对应的网址。

Copy the URL - https://graph.facebook.com/?fields=albums.fields(photos.fields(source)) and plug it into your browser. You should see a JSON of all your photos, and its corresponding url on Facebook's CDN.

这篇关于获取使用Facebook的API页面的所有照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆