Sharing a photo with text

The example “Add a cat to this” explains how to share a photo with my service.

But is there a way to share a photo with text (using a voice recorder) in one element?

+4
source share
1 answer

Yes! You can do this using the REPLY built-in menu item .

However, the stream is slightly different from the Add Cat to That stream. It works as follows:

  • Subscribe to the timeline collection updates.
  • Insert a timeline element using the REPLY built-in action, specified as here . If desired, you can rename the menu item and customize the icon.

     { "text": "Hello world", "menuItems": [ { "action": "REPLY" } ] } 
  • An answer option will be selected in its menu on the timeline map. When the user selects it, they will be asked to talk.

  • Then a new temporary map is created that contains the text transcription and has an attached audio recording. Your dishes have access to this card.
  • Your glassware then notified of this insert. The notification looks something like this:

     { "collection": "timeline", "itemId": "3hidvm0xez6r8_dacdb3103b8b604_h8rpllg", "operation": "INSERT", "userToken": "harold_penguin", "verifyToken": "random_hash_to_verify_referer", "userActions": [ { "type": "REPLY" } ] } 
  • Get the specified timeline element for access to the transcribed text (in the text property) and an audio recording is attached
+3
source

All Articles