jgorset / facebook-messenger

Definitely the best way to make Bots on Facebook Messenger with Ruby
MIT License
962 stars 211 forks source link

Unknown error has occured. #250

Closed eebasadre20 closed 5 years ago

eebasadre20 commented 5 years ago

Hi here,

I'm encountered raise_errors: An unknown error has occurred. (Facebook::Messenger::Subscriptions::Error) in which I don't know what's the exact error. I'm just started trying this gem to implement the bot.

Here's the code I tried which came from the documentation

require "facebook/messenger"
include Facebook::Messenger
Facebook::Messenger::Subscriptions.subscribe(access_token: "ACCESS_TOKEN_HERE")
Bot.on :message do |message|
  message.reply(text: 'Hello, human!')
end

Any help is much appreciated.

Thanks!

jgorset commented 5 years ago

Hi @eebasadre20! That's strange. Just to be clear, you did send in a valid access token (as opposed to the string "ACCESS_TOKEN_HERE"), right? If so, could you provide the complete stack trace as well?

eebasadre20 commented 5 years ago

Hi @eebasadre20! That's strange. Just to be clear, you did send in a valid access token (as opposed to the string "ACCESS_TOKEN_HERE"), right? If so, could you provide the complete stack trace as well?

Hi @jgorset , forgot to close this one. I managed to fix, I dug your source code and I think you're correct it is an invalid access token. Thanks for the reply.