Repo for all the code talked about in this blogpost: https://vandevliet.me/bot-automatically-responds-comments-facebook/.
This code monitors all the comments of a Facebook post, and then comments on the comments with a custom photo. In this code there is an example on how you can make it respond with an image that includes the orginal commenter's profile picture.
This code is just a demo :) Especially with HTTP requests there should be some error handling. But that shouldn't be too hard to implement!
- Python 3 and all the requirements in the requirements.txt file
- A (published) Facebook page
- A Facebook app
- An access token (In the blogpost you'll learn how to get a long-lived access token)
Need more info? I created a whole blogpost to explain the code and how you can change it to suit your needs.
This code is released under MIT license
Special thanks to Inti De Ceukelaire, who was the first one to write (I think) to write such a tool. You can find more info about how he implemented it here (in Dutch).