- Node.js >= 18.1.0
- yarn >= 1.19.0
- ffmpeg >= 6.0.0
- yt-dlp latest. At the time of writing this document, the latest version is
2024.01.02
. You can download it from here.
https://developers.facebook.com/docs/instagram-api/getting-started
This step is required if you want to post the reels videos to your instagram account. You need create a instagram pageId and get the access token.
- Create a instagram creator account or business account.
- Create a facebook page and link it to your instagram account.
- Create a facebook business app and enable facebook login.
- Use facebook graph api explorer to get the pageId and access token.
- Select your business app. Which you created in step 3.
- Select
Get User Access Token
. - Select
pages_show_list
,instagram_basic
,instagram_content_publish
, andpublish_video
permissions. - Click
Generate Access Token
. Keep the access token. We will use it later. - Follow this instruction to get the instagram pageId. https://developers.facebook.com/docs/instagram-api/getting-started#4--get-the-user-s-pages. Keep the pageId. We will use it later.
- Convert short-lived access token to long-lived access token. https://developers.facebook.com/docs/instagram-api/getting-started#5--convert-the-short-lived-token-to-a-long-lived-token. Keep the long-lived access token. We will use it later.
- Clone this repo to your local.
- Run
yarn install
to install the dependencies.
- Create
.env
file in the root directory of this repo. - Copy the content of
.env.example
to.env
and fill the values. You can get the values from the pre-requirements section. Instagram access token and pageId are required if you want to post the reels videos to your instagram account. - Use chrome to open the instagram and login your account. This will help
yt-dlp
can re-use the cookies to download the private videos. - Run
yarn start
to start the script.
If you are using Mac OS, you can quickly run the script by running ./start.sh
command. It will install the dependencies and start the script.
"# reel_video_bot"