3

I'm currently trying to get all the appointments users requested on my page. So I set up a Webhook to get them in real time to then save them into my database:

GET /v3.2/{id_page}/subscribed_apps path send me this response so I'm well subscribed:

{
  "data": [
    {
      "link": "linktopage",
      "name": "pagename",
      "id": "idpage",
      "subscribed_fields": [
        "messaging_appointments",
      ]
    }
  ]
}

Now the problem is, Facebook send me this when someone request an appoinment :

 {  
       "object":"page",
       "entry":[  
          {  
             "id":"idpage",
             "time":1552015328847,
             "messaging":[  
                {  
                   "sender":{  
                      "id":"idsender"
                   },
                   "recipient":{  
                      "id":"idpage"
                   },
                   "timestamp":1552015327245,
                   "message":{  
                      "mid":"idmessage",
                      "seq":223007,
                      "attachments":[  
                         {  
                            "title":"Appointment Request",
                            "url":null,
                            "type":"fallback",
                            "payload":null
                         }
                      ]
                   }
                }
             ]
          }
       ]
    }

Facebook doesn't send me the date for the appointment, nor the duration, and I need those informations. (Time and timestamp indicate when the webhook occurred)

When I try to get the message with mid with path GET /v3.2/{message-id}, the api tells me

"(#803) Some of the aliases you requested do not exist: idmessage"

Is there something I'm doing wrong? Thanks

Thib Wil
  • 31
  • 5

0 Answers0