Skip to content

Commit

Permalink
changing GraphAPI version to the latest, merging pull request related…
Browse files Browse the repository at this point in the history
… to Actions
  • Loading branch information
sSimuSs committed Jun 30, 2022
1 parent b136d45 commit cc80ff2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions messenger.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ func (m *Messenger) handle(w http.ResponseWriter, r *http.Request) {
return
}

if rec.Object != "page" {
fmt.Println("Object is not page, undefined behaviour. 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
}
Expand Down
4 changes: 2 additions & 2 deletions response.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ type SenderAction string

const (
// SendMessageURL is API endpoint for sending messages.
SendMessageURL = "https://graph.facebook.com/v2.11/me/messages"
SendMessageURL = "https://graph.facebook.com/v11.0/me/messages"
// ThreadControlURL is the API endpoint for passing thread control.
ThreadControlURL = "https://graph.facebook.com/v2.6/me/pass_thread_control"
ThreadControlURL = "https://graph.facebook.com/v11.0/me/pass_thread_control"
// InboxPageID is managed by facebook for secondary pass to inbox features: https://developers.facebook.com/docs/messenger-platform/handover-protocol/pass-thread-control
InboxPageID = 263902037430900

Expand Down

0 comments on commit cc80ff2

Please sign in to comment.