This is a PHP library for downloading media from Facebook. It allows you to easily download videos and reels from Facebook.
To install the Facebook Media Downloader, follow these steps:
composer require sohagsrz/fbmediadownloader
<?php
require 'vendor/autoload.php';
use FbMediaDownloader\Downloader;
$downloader = new Downloader();
//set idurl
$downloader->set_url('https://www.facebook.com/sohagsrz/videos/277183161103537');
$datas = $downloader->generate_data();
var_dump($datas);
?>
{
"title": "",
"dl_urls": {
"low": "https://video.fdac7-1.fna.fbcdn.net/v/t42.1790-2/273515319_640783503829950_9149715574191626612_n.mp4?_nc_cat=111&ccb=1-7&_nc_sid=55d0d3&efg=eyJybHIiOjMzNCwicmxhIjo1MTIsInZlbmNvZGVfdGFnIjoic3ZlX3NkIiwidmlkZW9faWQiOjI3NzE4MzE2MTEwMzUzN30%3D&_nc_ohc=liZyYb2BPtQQ7kNvgEl6X68&rl=334&vabr=186&_nc_ht=video.fdac7-1.fna&oh=00_AYDTX7_zzbLdtqFGZ04d3sYXYbCbATeDun6gQm_ldDqqNw&oe=66588B79&dl=1",
"lowData": {
"size": "1836881",
"sizeHuman": "1.75 MB",
"type": "video/mp4"
},
"high": "https://video.fdac7-1.fna.fbcdn.net/o1/v/t2/f2/m69/An_LXwcXLs40mLZWLUCzsg5VLsTGk4Mo3axbJAaTZBWQVnQdTdoNBSDPV01Yme2OBcEkaBLvcJYhBMQSF1KreGZL.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6Im9lcF9oZCJ9&_nc_ht=video.fdac7-1.fna.fbcdn.net&_nc_cat=103&strext=1&vs=1a197f40e74c2561&_nc_vs=HBksFQIYOnBhc3N0aHJvdWdoX2V2ZXJzdG9yZS9HTnpxWHhwMzdfU3Z4dE1HQUQzUGYybzVlTlFZYm1kakFBQUYVAALIAQAVAhg6cGFzc3Rocm91Z2hfZXZlcnN0b3JlL0dLQU5UeEF0bkl5WlBxY0VBTXlkQ1NUMm9tVm9idjRHQUFBRhUCAsgBAEsHiBJwcm9ncmVzc2l2ZV9yZWNpcGUBMQ1zdWJzYW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"8.37 MB",
"type": "video/mp4"
}
},
"status": 200,
"id": "277183161103537",
"url": "https://www.facebook.com/sohagsrz/videos/277183161103537"
}
If you would like to contribute to the Facebook Media Downloader project, follow these steps:
- Fork the repository on GitHub.
- Clone the forked repository to your local machine.
- Make the necessary changes or additions to the code.
- Commit your changes and push them to your forked repository.
- Create a pull request to the original repository.