All Case Studies Design Development Interviews Our Way Project Management

Most Useful Facebook Messenger Platform Ruby On Rails Gem Is Here

Messenger bots are hot. So, as part of our community activity, we created a Ruby gem for them. As always at Netguru, we focused on quality and ease of use.

 PROBLEM

We wanted to create the easiest and fastest way to integrate FB bots with RoR apps. Why? Because the existing solutions lacked:

    1. wrapping payload data sent back to Facebook
    2. automating the bot verification process (subscription)
    3. full documentation
    4. full test coverage
    5. parsing payloads fetched from Facebook
    6. having made a first (v1.0.0) release!

PROCESS

We decided to start this little project as part of our internal “give back to the community” program. Two developers were involved on a part-time basis. Together, we spent about 40 hours creating this gem, which has 160 commits. Initially it worked quite well, but was buggy, so we added additional time to polish it.

We used the traditional Agile method. First, we just wanted to make it work and it took us one full day to create the first iteration. Then we looked at Facebook’s documentation and started implementing the next key features. We’ve created full, complete README documentation.

To be honest, during development, we were surprised about several limitations of the Facebook API. For example, you are not allowed to send more than 3 buttons in a button template. If ‘timestamp’ is not in timestamp format, the Facebook API throws out a ’Temporary send message failure’ error.

We discovered that sometimes an FB bot gets stuck if you forget to send a ‘successful response’ code after each POST request sent to Facebook. The best solution is just sending a ‘subscribe (verification)’ request.

SOLUTION

Our solution: we’ve created (in our opinion) the best open-source RoR gem for the Facebook Messenger Platform. Version 1.1.2 has all the key features proposed by the Facebook API, has full documentation and 100% test coverage. Click here to see our work, and let us know if you like it or what kind of improvement you would add.

That’s not all - we’ll soon publish an end-user oriented implementation of our gem. Stay tuned!

KEY FACTS

  • 160 commits
  • 100% test coverage
  • Code Climate 4.0
  • 6 releases
  • Loads of fun

Hope you'll like our gem! Let us know what you think in the comments below! You can also see a bot we've created recently that will help you organize your Github label chaos.

New Call-to-action
Follow Netguru
Join our Newsletter

Scaling SaaS
READ ALSO FROM Ruby/Ruby on Rails
Read also
Need a successful project?
Estimate project or contact us