通过 graph api 搜索 Facebook 用户视频?
是否可以获取列表或在 Facebook 用户视频中搜索描述中的文本?
注意:该用户已在我的应用程序中授予 users_videos 权限。
我已经能够上传视频,但无法将视频与专辑关联起来,因此我很难找到一种将视频与我的应用程序中的某个项目关联起来的方法以及我能想到的最佳方式是通过将视频与描述字段中的 ID 相关联来实现的。
我猜这必须通过 FQL 完成。如果是这样,有人有搜索视频的示例片段吗?谢谢!
Is is possible to get a list or search a Facebook users videos for text within a description?
Note: This user has granted users_videos permissions in my app.
I have been able to upload a video, but there is no way to associate the videos with an album so i'm having a hard time finding a way to associate the video to a certain item in my app and the best way I can think of is by associating the video with an id in the description field.
I'm guessing this must be done thru the FQL. If so, does anyone have examples snippets for searching the videos? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法直接从 Facebook 通过描述或标题搜索视频。这是因为 facebook 不允许在 WHERE 子句中使用不可索引的列。
我能想到的一种解决方法(但很糟糕)是获取所有视频并在本地搜索它们。这很糟糕,因为获取所有视频可能会非常慢,从而失去应用程序的可用性。
但对于您的情况,为什么不将视频 ID 与您自己的数据库中的项目相关联?
如果您上传视频,Facebook 会返回视频获得的 ID,因此您可以将此 ID 与您自己的数据库中所需的项目相关联,这样您就可以始终知道哪个视频对应哪个项目。
稍后您可以使用 Graph API 或 FQL 通过 ID 从 Facebook 调用这些视频
You can't search video by their description or title directly from facebook. This is because facebook doesn't allow non-indexable columns in WHERE clause.
One workaround (but a bad one) what I could think of, is to fetch all the videos and search them locally. This is bad because fetching all the videos might be dead-slow and thus losing the usability in your application.
But for your case, why don't you associate video ID to the items in your own database?
If you upload a video, facebook returns the ID that video got, so you can associate this id with the item you need in your own database, so you'll always know, which video goes by which item.
Later on you can call those videos out from facebook by their ID using either Graph API or FQL