{"id":17500383,"url":"https://github.com/jun85664396/messenger-bot-rails","last_synced_at":"2026-03-05T00:36:28.715Z","repository":{"id":56845372,"uuid":"56304112","full_name":"jun85664396/messenger-bot-rails","owner":"jun85664396","description":"Ruby on Rails Gem for the Facebook Messenger Bot Platform","archived":false,"fork":false,"pushed_at":"2017-08-15T13:24:05.000Z","size":32,"stargazers_count":67,"open_issues_count":0,"forks_count":19,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-02-20T08:08:50.798Z","etag":null,"topics":["chatbot","facebook","facebook-messenger-platform","messenger-bot","rails"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jun85664396.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-15T08:28:25.000Z","updated_at":"2025-08-30T22:38:44.000Z","dependencies_parsed_at":"2022-08-21T00:20:17.332Z","dependency_job_id":null,"html_url":"https://github.com/jun85664396/messenger-bot-rails","commit_stats":null,"previous_names":["jun85664396/facebook-bot"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/jun85664396/messenger-bot-rails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jun85664396%2Fmessenger-bot-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jun85664396%2Fmessenger-bot-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jun85664396%2Fmessenger-bot-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jun85664396%2Fmessenger-bot-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jun85664396","download_url":"https://codeload.github.com/jun85664396/messenger-bot-rails/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jun85664396%2Fmessenger-bot-rails/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30102482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T23:59:36.199Z","status":"ssl_error","status_checked_at":"2026-03-04T23:56:48.556Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","facebook","facebook-messenger-platform","messenger-bot","rails"],"created_at":"2024-10-19T18:09:02.033Z","updated_at":"2026-03-05T00:36:28.662Z","avatar_url":"https://github.com/jun85664396.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# messenger-bot\n[![Build Status](https://travis-ci.org/jun85664396/messenger-bot-rails.svg?branch=master)](https://travis-ci.org/jun85664396/messenger-bot-rails)\n[![Gem Version](https://badge.fury.io/rb/messenger-bot.svg)](https://badge.fury.io/rb/messenger-bot)\n\nRuby on Rails client!! for [Facebook Messenger Platform](https://developers.facebook.com/docs/messenger-platform)\n\nRequires Rails \u003e= 4\n\n## Installation\n\nBundler in your Gemfile.\n\n```ruby\ngem 'messenger-bot'\n```\n\n## Getting Started\n\n#### Before You Begin\n  Now sign in into the [Facebook developer](https://developers.facebook.com/apps) and create an application\n\n1. Add `messenger-bot-rails` to your Gemfile\n  ```ruby\n  gem 'messenger-bot'\n  ```\n\n2. Set config in `config/initializers/messenger_bot.rb `\n  ```ruby\n  Messenger::Bot.config do |config|\n    config.access_token = \u003cPAGE_ACCESS_TOKEN\u003e\n    config.validation_token = \u003cVERIFY_TOKEN\u003e\n    config.secret_token = \u003cFB_APP_SECRET_TOKEN\u003e\n  end\n  ```\n  [Subscribe the App to the Page](https://developers.facebook.com/docs/messenger-platform/quickstart#subscribe_app_page)\n  \n3. Add the following to your `config/routes.rb`\n  ```ruby\n  mount Messenger::Bot::Space =\u003e \"/webhook\"\n  ```\n4. create a controller in `app/controllers/messenger_bot_controller.rb`\n  ```ruby\n  class MessengerBotController \u003c ActionController::Base\n    def message(event, sender)\n      # profile = sender.get_profile(field) # default field [:locale, :timezone, :gender, :first_name, :last_name, :profile_pic]\n      sender.reply({ text: \"Reply: #{event['message']['text']}\" })\n    end\n  \n    def delivery(event, sender)\n    end\n  \n    def postback(event, sender)\n      payload = event[\"postback\"][\"payload\"]\n      case payload\n      when :something\n        #ex) process sender.reply({text: \"button click event!\"})\n      end\n    end\n  end\n  ```\n\n[wiki](https://github.com/jun85664396/messenger-bot-rails/wiki/Getting-Started)\n\n## Usage\n\n### message(event, sender)\n* `event` - Hash containing the message event from Facebook [format](https://developers.facebook.com/docs/messenger-platform/webhook-reference#received_message)\n* `sender` - Class to call the 'reply, get_profile' method.\n\n### delivery(event, sender)\n* `event` - Hash containing the delivery event from Facebook [format](https://developers.facebook.com/docs/messenger-platform/webhook-reference#message_delivery)\n* `sender` - Class to call the 'reply, get_profile' method.\n\n### postback(event, sender)\n* `event` - Hash containing the postback event from Facebook [format](https://developers.facebook.com/docs/messenger-platform/webhook-reference#postback)\n* `sender` - Class to call the 'reply, get_profile' method.\n\n### optin(event, sender)\n* `event` - Hash containing the optin event from Facebook [format](https://developers.facebook.com/docs/messenger-platform/webhook-reference#postback)\n* `sender` - Class to call the 'reply, get_profile' method.\n\n\n## license\n\nMIT, see [LICENSE.txt](LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjun85664396%2Fmessenger-bot-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjun85664396%2Fmessenger-bot-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjun85664396%2Fmessenger-bot-rails/lists"}