-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix JSON object structure #1
base: master
Are you sure you want to change the base?
Conversation
What version of Go are you using? |
@@ -34,17 +34,19 @@ func verifyToken(bot *Bot, w http.ResponseWriter, r *http.Request) { | |||
} | |||
|
|||
type receive struct { | |||
Object string `json:"object"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Object is a string and always "page". Not sure if we need this:
https://developers.facebook.com/docs/messenger-platform/webhook-reference#common_format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least we have to set it to json:"-" I think.
2016年5月18日 20:23於 "frodsan" notifications@github.com寫道:
In server.go #1 (comment)
:@@ -34,17 +34,19 @@ func verifyToken(bot *Bot, w http.ResponseWriter, r *http.Request) {
}type receive struct {
- Object string
json:"object"
Object is a string and always "page". Not sure if we need this:
https://developers.facebook.com/docs/messenger-platform/webhook-reference#common_format
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/frodsan/fbot/pull/1/files/eeb7ca1f0fb47cd09ae101dd9707bdee44a33268#r63692587
1.6.2 on Red hat 6.7 and OSX 10.11.4.
|
Hi there:
It seems that go cannot unmarshal correctly under current structure matrix. I have add 4 element onto two topmost level struct at server.go. Then it works.
Just send it back and see if you want to merge it.