diff --git a/messenger.go b/messenger.go index 51fb080..21a3456 100644 --- a/messenger.go +++ b/messenger.go @@ -302,9 +302,9 @@ func (m *Messenger) handle(w http.ResponseWriter, r *http.Request) { respond(w, http.StatusBadRequest) return } - - if rec.Object != "page" { - fmt.Println("Object is not page, undefined behavior. Got", rec.Object) + + if rec.Object != "page" && rec.Object != "instagram" { + fmt.Println("Object is not page or instagram, undefined behaviour. Got", rec.Object) respond(w, http.StatusUnprocessableEntity) return } diff --git a/response.go b/response.go index f2a19c1..eb2804a 100644 --- a/response.go +++ b/response.go @@ -24,7 +24,7 @@ type ImageAspectRatio string const ( // DefaultSendAPIVersion is a default Send API version - DefaultSendAPIVersion = "v2.11" + DefaultSendAPIVersion = "v11.0" // SendMessageURL is API endpoint for sending messages. SendMessageURL = "https://graph.facebook.com/%s/me/messages" // ThreadControlURL is the API endpoint for passing thread control.