Skip to content

Instantly share code, notes, and snippets.

@progapandist
Last active December 16, 2016 12:09
Show Gist options
  • Save progapandist/bb23603694b57287ccf8d7a1b772adeb to your computer and use it in GitHub Desktop.
Save progapandist/bb23603694b57287ccf8d7a1b772adeb to your computer and use it in GitHub Desktop.
require 'facebook/messenger'
include Facebook::Messenger
# NOTE: ENV variables should be set directly in terminal for testing on localhost
# Subcribe bot to your page
Facebook::Messenger::Subscriptions.subscribe(access_token: ENV["ACCESS_TOKEN"])
Bot.on :message do |message|
message.reply(text: 'Hello!')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment