Prerequisite: Make sure you have Python installed on your device.
Download this code.
Open your code editor (VS Code, PyCharm, etc.).
Set up the code for your environment:
- Open a terminal or command prompt.
- Install required libraries:
(If you encounter "zsh: command not found: pip", try to run:)
pip install webdriver pip install seleniumpip3 install webdriver pip3 install selenium
Update your information:
- In the
FacebookAccountInfo.pyfile:- Enter your Gmail and Facebook password:
# input your email username = 'YourGmail@gmail.com' # input your password password = 'YourFacebookPassword'
- Enter your Gmail and Facebook password:
- In the
MessengerBot_Optimized.pyfile:- On line 74, modify the message details:
bot1.SendMessageTo('FriendName', 'MessageText', NumberOfMessages)FriendName: Replace with your friend's name on Facebook.MessageText: Replace with the text you want to send.NumberOfMessages: Specify the number of messages to send.
- On line 74, modify the message details:
Run the code: