An Example Bot for Twitter & Facebook

Here’s a small Python script to run your own Every Word Bot variant on Facebook and Twitter. The basic guide is available at the bottom of the article. Unfortunately, the guide is not applicable to beginners. Here’s the GitHub repo.

Step 1 — You need a VPS to host and run this script. I highly recommend a DigitalOcean droplet. I think you’ll get a 50USD or 100USD credit on DigitalOcean when you sign-up with the link I shared. You could check Amazon AWS or Google Cloud Platform also. Select Debian, Ubuntu, or CentOS while you’re creating a droplet or instance.

Step 2 — Install Python 3 followed by the modules facebook, tweepy, and schedule. Installing modules will become fairly easy once you get the hang of it. 

Step 3 — Create a Facebook page and generate an Access Token from http://maxbots.ddns.net/token/. Paste the token to the accesstoken field in the script.

Step 4 — Create a Twitter app and generate tokens & secret keys. It’s explained in the Access token/secret method section of this blog post

Step 5 — Download the English words data-set of your choice.  Replace the words.txt in my repo with the text set of yours. Fire up the script with the command sudo python3 main.py

You can use tmux to manage the sessions.

Also read: https://github.com/aparrish/everywordbot

Get Creative

Look at @loveeveryword and @bottubebot for example. You could use Pillow to post images or even GTTS + moviepy to post videos.

Credit: Cover Photo by Brett Jordan on Unsplash

What's faster than a VPN?

Use SocketPro. Best VPN alternative for expats in China.

How to set up a fast website in China?

I provide top-notch website optimization services for China.

See also

Free DigitalOcean CreditCheap VPS HostingSet up a blog in ChinaExpat life in ChengduSpeed up website for ChinaBest VPNs for ChinaHackintosh Journal Sponsor or Donate.

© 2020 Site Notice. Powered by DigitalOcean & GP.