From 681541d027089d97653813bb3abe1cf29bdd399a Mon Sep 17 00:00:00 2001 From: Harrison Date: Fri, 20 May 2016 09:18:44 +1000 Subject: [PATCH] Parse IDs as strings Facebook changed their API to use strings instead of ints for IDs due to some node.js limitation. Fix #4 --- receiving.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/receiving.go b/receiving.go index 7b22ab2..090c941 100644 --- a/receiving.go +++ b/receiving.go @@ -12,7 +12,7 @@ type Receive struct { // Entry is a batch of events which were sent in this webhook trigger. type Entry struct { // ID is the ID of the batch. - ID int64 `json:"id"` + ID int64 `json:"id,string"` // Time is when the batch was sent. Time int64 `json:"time"` // Messaging is the events that were sent in this Entry @@ -39,12 +39,12 @@ type MessageInfo struct { // Sender is who the message was sent from. type Sender struct { - ID int64 `json:"id"` + ID int64 `json:"id,string"` } // Recipient is who the message was sent to. type Recipient struct { - ID int64 `json:"id"` + ID int64 `json:"id,string"` } // Attachment is a file which used in a message.