{"id":28350576,"url":"https://github.com/iamvinit/fbmemebot","last_synced_at":"2026-04-16T01:33:19.941Z","repository":{"id":122730860,"uuid":"116846002","full_name":"iamvinit/FBmemebot","owner":"iamvinit","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-23T18:31:40.000Z","size":10327,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-28T18:53:22.044Z","etag":null,"topics":["chatbot","hasura","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamvinit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-01-09T17:09:59.000Z","updated_at":"2018-01-10T11:11:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"3dd9c928-4975-4af2-a01a-cb506a707193","html_url":"https://github.com/iamvinit/FBmemebot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iamvinit/FBmemebot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamvinit%2FFBmemebot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamvinit%2FFBmemebot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamvinit%2FFBmemebot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamvinit%2FFBmemebot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamvinit","download_url":"https://codeload.github.com/iamvinit/FBmemebot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamvinit%2FFBmemebot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31867711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","hasura","nodejs"],"created_at":"2025-05-27T21:12:57.126Z","updated_at":"2026-04-16T01:33:19.927Z","avatar_url":"https://github.com/iamvinit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Facebook Messenger Bot that creates memes on Hasura\n**This is the facebook messenger bot you will have:**\n\n![](https://media.giphy.com/media/3oFzm6GCcf0XF2LVwk/giphy.gif)\n\nThis tutorial consists of a simple facebook messenger bot which helps to creates meme from a given image. The user first sends an image to the bot followed by upper text and lower text to be embedded on the image. The bot replies back with the image of the meme.\n\nFor the chat bot to function we'll need a server that will receive the messages sent by the Facebook users, process this message and respond back to the user. To send messages back to the server we will use the graph API provided by Facebook. For the Facebook servers to talk to our server, the endpoint URL of our server should be accessible to the Facebook server and should use a secure HTTPS URL. For this reason, running our server locally will not work and instead we need to host our server online. In this tutorial, we are going to deploy our server on Hasura which automatically provides SSL-enabled domains.\n\n## Pre-requisites\n\n* [NodeJS](https://nodejs.org)\n\n* [hasura CLI](https://docs.hasura.io/0.15/manual/install-hasura-cli.html)\n\n## Getting the bot running\n\n### Create a facebook application\n\n* Navigate to https://developers.facebook.com/apps/\n* Click on **'+ Create a new app’**.\n\n![Fb app screen](https://raw.githubusercontent.com/iamvinit/FBmemebot/master/assets/tutorial_fb_app_screen.png \"fb app screen\")\n\n* Give a display name for your app and a contact email.\n\n![Fb app screen2](https://raw.githubusercontent.com/iamvinit/FBmemebot/master/assets/tutorial_fb_app_screen2.png \"fb app screen2\")\n\n* In the select a product screen, hover over **Messenger** and click on **Set Up**\n\n![Fb app screen3](https://raw.githubusercontent.com/iamvinit/FBmemebot/master/assets/tutorial_fb_app_screen3.png \"fb app screen3\")\n\n* To start using the bot, we need a facebook page to host our bot.\n  + Scroll over to the **Token Generation** section\n  + Choose a page from the dropdown (Incase you do not have a page, create one)\n  + Once you have selected a page, a *Page Access Token* will be generated for you.\n  + Save this token somewhere.\n\n![Page token](https://raw.githubusercontent.com/iamvinit/FBmemebot/master/assets/tutorial_fb_bot_page_token.png \"Page token\")\n\n* Now, we need to trigger the facebook app to start sending us messages\n  - Switch back to the terminal\n  - Paste the following command:\n\n```sh\n# Replace \u003cPAGE_ACCESS_TOKEN\u003e with the page access token you just generated.\n$ curl -X POST \"https://graph.facebook.com/v2.6/me/subscribed_apps?access_token=\u003cPAGE_ACCESS_TOKEN\u003e\"\n```\n\n### Getting the Hasura project\n\n```sh\n$ hasura quickstart jaison/fb-bot\n$ cd fb-bot\n# Add FACEBOOK_VERIFY_TOKEN to secrets. This is any pass phrase that you decide on, keep a note on what you are choosing as your verify token, we will be using it later while setting things up for your bot on the facebook developer page.\n$ hasura secrets update bot.fb_verify_token.key \u003cYOUR-VERIFY-TOKEN\u003e\n# Add FACEBOOK_PAGE_ACCESS_TOKEN to secrets\n$ hasura secrets update bot.fb_page_token.key \u003cYOUR-FB-PAGE-ACCESS-TOKEN\u003e\n# Deploy\n$ git add . \u0026\u0026 git commit -m \"Deployment commit\"\n$ git push hasura master\n```\n\nAfter the `git push` completes:\n\n```sh\n$ hasura microservice list\n```\n\nYou will get an output like so:\n\n```sh\nINFO Getting microservices...                     \nINFO Custom microservices:                        \nNAME   STATUS    INTERNAL-URL(tcp,http)   EXTERNAL-URL\nbot    Running   bot.default              https://bot.apology69.hasura-app.io\n\nINFO Hasura microservices:                        \nNAME            STATUS    INTERNAL-URL(tcp,http)   EXTERNAL-URL\nauth            Running   auth.hasura              https://auth.apology69.hasura-app.io\ndata            Running   data.hasura              https://data.apology69.hasura-app.io\nfilestore       Running   filestore.hasura         https://filestore.apology69.hasura-app.io\ngateway         Running   gateway.hasura           \nle-agent        Running   le-agent.hasura          \nnotify          Running   notify.hasura            https://notify.apology69.hasura-app.io\nplatform-sync   Running   platform-sync.hasura     \npostgres        Running   postgres.hasura          \nsession-redis   Running   session-redis.hasura     \nsshd            Running   sshd.hasura              \nvahana          Running   vahana.hasura\n```\n\nFind the EXTERNAL-URL for the service named `bot`(in this case -\u003e https://bot.apology69.hasura-app.io).\n\n### Enabling webhooks\n\nIn your fb app page, scroll down until you find a card name `Webhooks`. Click on the `setup webhooks` button.\n\n![Enable webhooks2](https://raw.githubusercontent.com/iamvinit/FBmemebot/master/assets/tutorial_fb_bot_enable_webhooks2.png \"Enable webhooks2\")\n\n* The `callback URL` is the URL that the facebook servers will hit to verify as well as forward the messages sent to our bot. The nodejs app in this project uses the `/webhook` path as the `callback URL`. Making the `callback URL` https://bot.YOUR-CLUSTER-NAME.hasura-app.io/webhook (in this case -\u003e https://bot.apology69.hasura-app.io/webhook/)\n* The `verify token`is the verify token that you set in your secrets above (in the command $ hasura secrets update bot.fb_verify_token.key \u003cYOUR-VERIFY-TOKEN\u003e)\n* After selecting all the `Subsciption Fields`. Submit and save.\n* You will also see another section under `Webhooks` that says `Select a page to subscribe your webhook to the page events`, ensure that you select the respective facebook page here.\n\nNext, open up your facebook page.\n\n* Hover over the **Send Message** button and click on Test Button.\n\n\n![Test button](https://raw.githubusercontent.com/iamvinit/FBmemebot/master/assets/tutorial_fb_bot_page_add_button.png \"Add button\")\n* Send a message to your bot.\n\nTest out your bot, on receiving an image it should ask for upper text and lower text and respond with the image of the meme.\n\n## Support\n\nIf you happen to get stuck anywhere, feel free to raise an issue [here](https://github.com/iamvinit/FBmemebot)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamvinit%2Ffbmemebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamvinit%2Ffbmemebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamvinit%2Ffbmemebot/lists"}