Buttons working on iOS + WEB + Desktop WhatsApp, but not for Android #650
Replies: 6 comments 9 replies
-
Since the latest changes from WhatsApp it should only be possible with the official WhatsApp Business API afaik. |
Beta Was this translation helpful? Give feedback.
-
@brunoaduarte |
Beta Was this translation helpful? Give feedback.
-
Is there currently a code for the send button? In addition, when sending a template message, what is the message type and media type? |
Beta Was this translation helpful? Give feedback.
-
at this time you cannot do that, i think meta filtered messages like that
if coming from regular whatsapp.
Pada Sel, 8 Okt 2024 pukul 20.01 Patricia C Stryker <
***@***.***> menulis:
… Is there currently a code for the send button? In addition, when sending a
template message, what is the message type and media type?
—
Reply to this email directly, view it on GitHub
<#650 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALJQY2EUYMRMXOZU2JJXI33Z2PJUJAVCNFSM6AAAAABNJC3RP2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBXHE4TINQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
any updates about this ? it works fine for android but not IOS for me |
Beta Was this translation helpful? Give feedback.
-
No one its work since 2023
Pada Kam, 14 Nov 2024 10.47, Bruno Duarte ***@***.***>
menulis:
… @w3nder <https://github.com/w3nder> the buttons doesn't work for iOS,
nothing is received on the device. Is it working for you?
type InteractiveMessage_NativeFlowMessage_NativeFlowButton struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
ButtonParamsJSON *string `protobuf:"bytes,2,opt,name=buttonParamsJSON" json:"buttonParamsJSON,omitempty"`
}
func (cli *Client) GetButtons(title, content, footer string, buttonText []string) *waE2E.Message {
var nativeFlowButtons []*waE2E.InteractiveMessage_NativeFlowMessage_NativeFlowButton
msgVersion := int32(1)
deviceListMetadataVersion := int32(2)
for _, button := range buttonText {
jsonData, _ := json.Marshal(ButtonParams{
DisplayText: button,
ID: ".menu",
})
nativeFlowButtons = append(nativeFlowButtons, &waE2E.InteractiveMessage_NativeFlowMessage_NativeFlowButton{
Name: proto.String("quick_reply"),
ButtonParamsJSON: proto.String(string(jsonData)),
})
}
return &waE2E.Message{
InteractiveMessage: &waE2E.InteractiveMessage{
Header: &waE2E.InteractiveMessage_Header{
Title: proto.String(title),
Subtitle: proto.String(content),
HasMediaAttachment: proto.Bool(false),
},
Footer: &waE2E.InteractiveMessage_Footer{
Text: proto.String(footer),
},
Body: &waE2E.InteractiveMessage_Body{
Text: proto.String(content),
},
InteractiveMessage: &waE2E.InteractiveMessage_NativeFlowMessage_{
NativeFlowMessage: &waE2E.InteractiveMessage_NativeFlowMessage{
MessageVersion: &msgVersion,
Buttons: nativeFlowButtons,
},
},
ContextInfo: &waE2E.ContextInfo{},
},
MessageContextInfo: &waE2E.MessageContextInfo{
DeviceListMetadata: &waE2E.DeviceListMetadata{},
DeviceListMetadataVersion: &deviceListMetadataVersion,
},
}
}
cli.GetButtons("title", "content", "footer", []string{"button"}, nil)
BTW, if I comment
// Name: proto.String("quick_reply"),
The message is received, but the button is empty
image.png (view on web)
<https://github.com/user-attachments/assets/e96d127e-b151-4aaf-a2d2-8124c62d0f8d>
—
Reply to this email directly, view it on GitHub
<#650 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALJQY2HU3UE5OBU3YOH4XST2AQMLXAVCNFSM6AAAAABNJC3RP2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMRUHEYDGMY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi! Is there any secret to make a button message arrive on an Android device ?
My code does send a message button to all other 3 devices: iOS, Web and Windows Desktop successfully, but on Android receiver nothing appears on the chat.
It's strange though, because I tried a service that sends an OTP code to WhatsApp numbers (there's a copy button on the message) and the Android device received it.
Is anything wrong with my code?
I even tried to clone the entire message from the OTP example so it's exactly the same, even with that the message does not display.
FYI: I've tried mocking "TemplateID", "RecipientKeyHash", "RecipientKeyIndexes", "RecipientTimestamp" to the same as the message that arrived on the Android device (sent by the OTP service I've tested).
Beta Was this translation helpful? Give feedback.
All reactions