(#100) No matching user found using the facebook messenger bot WORKAROUND
A very common error on the node.js console when typing a message and sending it to the bot is to receive '(#100) No matching user found' as a response.
The workaround for this issue is quite simple: you just need to bypass your own messages.
You can obtain your Bot id by reviewing your messages:
JSON sample:
Tip: to identify your BotID just look for "message": {"is_echo": true,.. in message payload.
Further reading: Message Received Reference - Facebook
The workaround for this issue is quite simple: you just need to bypass your own messages.
Use Case
Your Bot has a unique ID (it's not the App ID) so you can try this workaround in your POST logic:var myID = '...' ;
.....
event = req.body.entry[0].messaging[i];
sender = event.sender.id;
if (event.message && event.message.text && sender != myID) {
.....
}
You can obtain your Bot id by reviewing your messages:
"sender":{
"id":"USER_ID"
},
JSON sample:
even.message:
{"sender":{"id":"**yourBotID**"},
"recipient":{"id":"**clientID**"},
"timestamp":1468241667962,
"message": {"**is_echo":true**,
"app_id":**appID**,
"mid":"mid....",
"seq":617,"text":"..."}}
Tip: to identify your BotID just look for "message": {"is_echo": true,.. in message payload.
Further reading: Message Received Reference - Facebook
No comments