简体   繁体   English

如何为 Facebook 视频生成缩略图?

[英]How to generate thumbnail image for a facebook video?

How can I generate a thumbnail image from a facebook video and store it into a folder.The video url like below如何从 Facebook 视频生成缩略图并将其存储到文件夹中。视频网址如下所示

https://www.facebook.com/ {user.name}/videos/vb.xxxxx/{VideoID}/?type=2&theater https://www.facebook.com/ {user.name}/videos/vb.xxxxx/{VideoID}/?type=2&theater

Regards问候

You can probably avoid to generate it yourself.您可能可以避免自己生成它。 There is a dedicated api for this purpose.有一个专门用于此目的的api

The essential part is必不可少的部分是

/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '...?fields={fieldname_of_type_VideoThumbnail}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */

You can use facebook's Graph API to fetch Video thumbnail of a facebook video .您可以使用 facebook 的 Graph API 来获取 facebook 视频的视频缩略图。 Below link will help you more to get started.下面的链接将帮助您更多地开始。

https://developers.facebook.com/docs/graph-api/reference/video https://developers.facebook.com/docs/graph-api/reference/video

below link will help you to integrate facebook videos with PHP :下面的链接将帮助您将 facebook 视频与 PHP 集成:

https://www.codeofaninja.com/2014/10/display-facebook-video-on-website.html https://www.codeofaninja.com/2014/10/display-facebook-video-on-website.html

please mark this answer if it helps you.如果对您有帮助,请标记此答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM