- Multi-Photo Batching: Upload several photos at once. The bot holds them in memory until you're ready to publish.
- Smart Simple Mode: A high-speed flow for power users.
- Secure Access: Only people you authorize can use the bot. New users have to request access with an OTP code sent to you.
- Dynamic Buttons & Menus: Uses interactive WhatsApp buttons and list menus for selecting post buttons (Messenger, WhatsApp, etc.).
- Automatic Footers: Add up to 3 lines of signature/footer text to every post automatically.
- Session Cleanup: Automatically terminates hanging sessions after 60 seconds of inactivity to keep things fast.
By default, the bot asks for confirmation at every step. If you enable simple_mode: true in your config.yml, the process is cut in half:
- Send ?start.
- Upload your photos (one or many).
- Send your Post Description (The bot realizes you're done with photos the moment you send text).
- Pick your CTA Button from the menu.
- BOOM! The post is published instantly. No extra "Yes/No" confirmations needed.
Clone the repo and install the components:
git clone https://github.com/itzsd0811/whatsapp-hook-fb.git
cd whatsapp-hook-fb
npm installEdit config.yml with your Facebook Page info:
page_id: Find this in your Page's "About" section.access_token: Get this from the Facebook Developers Portal. Ensure you havepages_manage_postsandpages_read_engagementpermissions.
Run the start command and scan the QR code:
npm startOpen messages.yml to change any text the bot sends. You can change:
- Prefix: Change
?to!or anything you like. - Footers: Set
footer_line1,footer_line2, andfooter_line3for your signature. - Prompts: Customize how the bot asks for media or descriptions.
Q: The bot isn't seeing my images!
A: Make sure you've sent ?start first. If you're in a hurry, wait for the bot to reply "Received" before sending the next batch.
Q: I get a "path not defined" or "myNum" error. A: Make sure you're using the latest version of the script. These were bugs in older versions that are now fixed.
Q: Buttons aren't appearing on my phone.
A: Some versions of WhatsApp don't support native buttons. Don't worry—you can still type the commands like ?yes or ?no and the bot will understand!
Q: How do I remove a user?
A: Open whitelist.yml and just delete the line with their number.
This project is licensed under the MIT License - see the LICENSE file for details.


