How can I get the Share menu option to let users add a caption?
-
23-12-2019 - |
Question
I'm using the Share menu option on a card, but it's not having the ability to add a caption. Anything I should do to enable this?
Solution
Yup, as of XE10 you needed to add a list of sharingFeatures to the Contact you want to share with. In JSON form you need to add
"sharingFeatures": ["ADD_CAPTION"]
to the Contact. So the full Contact might look something like
{
"displayName": "Some Body",
"imageUrls": [
"http://example.com/somebody.jpg"
],
"sharingFeatures": [
"ADD_CAPTION"
]
}
Since you're using Java, make sure you have the latest library (v1-rev40-1.17.0-rc as of the time I post this), available at https://developers.google.com/api-client-library/java/apis/mirror/v1, which does have Contact.setSharingFeatures()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow