1
0
mirror of synced 2024-11-22 04:46:05 +03:00

add json omitempty on button Title field (#25)

Share Button only allows the Type field to be presented in the serialized data. Otherwise, you got facebook error:

"Facebook error : (#100) Param [elements][0][buttons][0][title] must be a non-empty UTF-8 encoded string"
This commit is contained in:
Wilson Wang 2017-02-06 08:05:01 -08:00 committed by Harrison Shoebridge
parent d8d9b9886f
commit 998c23c3e9

View File

@ -347,7 +347,7 @@ type StructuredMessageElement struct {
type StructuredMessageButton struct { type StructuredMessageButton struct {
Type string `json:"type"` Type string `json:"type"`
URL string `json:"url,omitempty"` URL string `json:"url,omitempty"`
Title string `json:"title"` Title string `json:"title,omitempty"`
Payload string `json:"payload,omitempty"` Payload string `json:"payload,omitempty"`
} }