Examples for sharing api

                     shareAction.resources = [ {
                         "data": listToShare,
                         "name": "the list"
                     } ]
                     shareAction.trigger()

does not work for me.
list to share a piece of text, a multiline string.
no share dialog does pop up.