Added compatibility for live in generateShareButton() and implemented it