用于获取照片的 Facebook FQL
我最初的目的是获取 Facebook 相册的每张照片的链接,因此我尝试执行此 FQL 查询:
select link from photo where aid=xxxxxxxxxxx
我想从 php 执行它,所以我首先尝试从 http://developers.facebook.com/docs/reference/fql/
但我不明白这行内容是关于什么的:
$code = $_REQUEST["code"];
那是什么时候$_REQUEST["code"]
设置了吗?
还有其他简单的想法来获取给定相册的照片链接吗?
My original point was to fetch the links of every photos of a facebook photo album, so I am trying to execute this FQL query:
select link from photo where aid=xxxxxxxxxxx
I want to execute it from php so I first tried to run the Facebook FQL sample from http://developers.facebook.com/docs/reference/fql/
But I can't figure out what is this line about:
$code = $_REQUEST["code"];
When is that $_REQUEST["code"]
set ?
Any other simple ideas to fetch photo links of a given photo album?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
文档中引用的 $_REQUEST 变量与客户端(网站访问者)授予您的应用程序使用其信息的权限后向您的服务器发出的访问令牌有关。如果您要访问可公开访问的信息,您将需要“应用程序登录”访问令牌。
您应该使用 php-sdk,因此不需要获取该代码,因为一旦您使用应用程序密钥/id 初始化 facebook 实例,它就会为您处理所有这些事情。
当我做类似的事情时,我是这样做的:
如果您要访问私人信息,您需要按照有关如何获取访问令牌代码的说明进行操作。您可以在 sdk 的“example”文件夹中查看如何获取它的示例。
The $_REQUEST variable referenced in the documentation pertains to the access token that the client (the website visitor) issues to your server once they grant permission for your to app to use their information. If you are accessing publicly accessible information you'll need an "app login" access token.
You should be using the php-sdk so getting that code isn't necessary because it handles all of that for you once you initialize a facebook instance with your app secret/id.
When I did something similar I did it this way:
If you are accessing private information you'll need to follow the instructions on how to get the access token code. You can see an example of how to get that within the "example" folder of the sdk.