是否可以使用 fql 来做到这一点

发布于 2025-01-08 12:38:16 字数 135 浏览 0 评论 0原文

使用 Facebook 的 Graph API,我目前正在循环访问所有朋友以检索他们的视频,然后向用户呈现这些视频的列表。显然,这需要一段时间才能完成,具体取决于朋友的数量,

有没有什么办法可以对 FQL 说 - 给我所有我有权观看的视频?

Using Facebook's Graph API, I am currently looping through all friends to retrieve their videos, and then present a list of these videos to the user. It obviusly takes a while to do this depending on number of friends,

Is there any way to just say to FQL - give me all videos that I have permsission to view?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

三生一梦 2025-01-15 12:38:16

Facebook 不希望应用程序能够“挖掘数据”。他们不希望应用程序能够收集他们想要的任何数据。在大多数情况下,必须指定 ID。

  • 用户 ID
  • 页面 ID
  • 组 ID
  • 事件 ID
  • 等...

即使在这种情况下也存在限制并且必须进行多次调用。限制本身不仅限于使用 FQL 或图形 API 访问数据。
您对 API 的访问也受到限制。这称为应用程序限制,如果他们发现您异常大量地调用 API,则可以对您的应用程序强制执行。还有其他限制,例如向用户发布多个连续帖子甚至重复帖子。

恐怕答案是否定的。

Facebook doesn't want applications to be able to "mine data". They don't want applications to be able to collect that much data on anything they want. In most cases an ID must be specified.

  • User ID
  • Page ID
  • Group ID
  • Event ID
  • etc...

Even in such a case there is also limitations and multiple calls will have to be made. The limitations themselves are not only limited to accessing data with FQL or the Graph API.
There are also limitations on your access to the API. This is called application throttling and it can be enforced on your application if they find you doing an abnormally large amount of calls to the API. There are also other limitations such as making multiple sequential posts or even duplicate posts to your users.

I'm afraid that the answer is no.

戈亓 2025-01-15 12:38:16

只是玩弄图形 API 资源管理器:

http://developers.facebook.com/tools/explorer?method=GET&path=fql%3Fq%3DSELECT%20vid%2C%20owner%2C%20title%2C% 20src%20FROM%20video%20WHERE%20owner%3Dme%28%29

我知道要获取我的朋友列表我可以这样做:

从朋友 WHERE uid1=me() 中选择 uid2

然后我将视频查询更新为:

http://developers.facebook.com/tools/explorer?method=GET&path=fql%3Fq%3DSELECT%20vid%2C%20owner%2C%20title %2C%20src%20FROM%20video%20WHERE%20owner%20IN%20%28SELECT%20uid2%20FROM%20friend%20WHERE%20uid1%3Dme%28%29%29

现在我得到了属于我朋友的所有视频的分页列表。这一个查询肯定比多次调用导致 API 崩溃要好。 :)

Just playing around with the graph API explorer:

http://developers.facebook.com/tools/explorer?method=GET&path=fql%3Fq%3DSELECT%20vid%2C%20owner%2C%20title%2C%20src%20FROM%20video%20WHERE%20owner%3Dme%28%29

I know that to get a list of my friends I can do:

SELECT uid2 FROM friend WHERE uid1=me()

I then updated the video query to:

http://developers.facebook.com/tools/explorer?method=GET&path=fql%3Fq%3DSELECT%20vid%2C%20owner%2C%20title%2C%20src%20FROM%20video%20WHERE%20owner%20IN%20%28SELECT%20uid2%20FROM%20friend%20WHERE%20uid1%3Dme%28%29%29

And now I get a paginated list of all videos belonging to my friends. This one query is certainly better than pounding the API to death with multiple calls. :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文