Closed davidmann4 closed 8 years ago
haha found the problem - used a wrong page_access_token
mm I have same problem, and again request page_access_token, but same error.
already solved? check your api keys and subscribe to the right page
I'm getting the same error. My page is subscribed and I generated a new token. The bot says Hello and then a bit after I get the server error. Any ideas?
do oyu have echon enabled? try to disable it
All okay now, thanks @davidmann4
I have tried all of the above and I'm still getting this error: Facebook::Messenger::Bot::RecipientNotFound (Unsupported post request. Object with ID 'me' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api):
Any tips or ideas would be of great help!
interesting - can you post the code you are using?
also echo is disabled in fb settings?
Echo is disabled, im not ddossing myself ;)
Code is super simple.
require 'facebook/messenger'
include Facebook::Messenger
Facebook::Messenger::Subscriptions.subscribe(access_token: ENV["ACCESS_TOKEN"])
Bot.on :message do |message|
message.reply(text: 'Hello, human!')
end
Facebook::Messenger::Bot::RecipientNotFound (Unsupported post request. Object with ID 'me' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api):
app/bot/listen.rb:4
Line 4 being my subscription with my page access token.
Additionally; leaving out the reply and inspecting the message variable gives me a valid message object.
#<Facebook::Messenger::Incoming::Message:0x007fdd2d4a40e0 @messaging={"sender"=>{"id"=>"1349987331712XXX"}, "recipient"=>{"id"=>"1683630555268XXX"}, "timestamp"=>1484149162343, "message"=>{"mid"=>"mid.1484149162343:d5a47f1649", "seq"=>121620, "text"=>"Why wont this work?"}}>
I have the same issue with the same sample code, but I get ERROR Facebook::Messenger::Bot::RecipientNotFound: (#100) No matching user found
. Any news on that?
The version of FB changed to v2.10, try this replacing the PAGE_ACCESS_TOKEN:
curl -X POST "https://graph.facebook.com/v2.10/me/subscribed_apps?access_token=PAGE_ACCESS_TOKEN"
Documentation: https://developers.facebook.com/docs/messenger-platform/guides/setup
This issue was caused by an invalid PAGE_ACCESS_TOKEN on my side, my mistake was that I recreated the token and they look very similar. Please make sure this token is exactly the same.
I am not using the Ruby client but I did come across this issue while googling for the same error. I have an AI bot built using nodejs and the page access token was the culprit to my issue as well. Hopefully this helps anyone else having the same cryptic error message. Cheers!
i removed message echoes in events it solved the problem
Hi, I am using your lib for my "quality of life" bot framework - currently switching from https://github.com/netguru/messenger-ruby
to your lib - looks way better and the other one does not accept pull requests & issues.
Currently I have a strange problem with the recipent id's - I use your example code but it seems that it somhow has the wrong id :)
any ideas?