Search code examples
phpfacebookcurlfacebook-messengerfacebook-messenger-bot

Facebook Messenger Send returns "No matching user found"


I want to send a message to a user from my server once they've finished successfully updating their payment details in a Facebook Messenger Webview, just before I close the webview window and return to the chat.

I'm sending a POST message, as defined, to https://graph.facebook.com/v2.6/me/messages?access_token=ABC In the format of:

{
  "recipient": {
    "id": 123456789
  },
  "message": {
    "text": "hello, world!"
  }
}

...where 123456789 is the valid Page Scoped User Id of the person I'm messaging (currently, that person is an admin of the app while we're in development).

The response I get is:

{
    "error": {
        "message": "(#100) No matching user found",
        "type": "OAuthException",
        "code": 100,
        "error_subcode": 2018001,
        "fbtrace_id": "CTdzskm/2rM"
    }
}

Nothing I do seems to change this. I simply cannot get my application to send a message to the Facebook Messenger chat via cURL.


Solution

  • Make sure you are using the same page-scoped access token to send the new message that was used when you received the person's PSID.