How shall I send Location Attachment
Closed this issue · 7 comments
jiyanibharat303 commented
Trying to send location as attachment :
$coordinates = [
"coordinates" => [
"lat" => "20.464079",
"long" => "74.996857"
]
];
$bot->send(
new StructuredMessage($senderID,
StructuredMessage::TYPE_GENERIC,
[
'text' => 'Location',
],
[
new Attachment(Attachment::TYPE_LOCATION, $coordinates,[])
]
));
Please help
wittfabian commented
Use markdown in your description
wittfabian commented
Check the examples for StructuredMessage
:
https://github.com/pimax/fb-messenger-php-example
jiyanibharat303 commented
Hello Sir,
I have tried those that is working with the button elements but not with attachments. Can you show and example for attachments.
wittfabian commented
Your example does not match with the one we created!
StructuredMessage
__construct($recipient, $type, $data, $quick_replies = array(), $tag = null, $notification_type = parent::NOTIFY_REGULAR)
I think locations as attachments is not possible.
https://developers.facebook.com/docs/messenger-platform/send-api-reference/contenttypes
wittfabian commented
wittfabian commented
solved?
wittfabian commented
No answer, closed!