Skip to content

Short example of how to use the share feature in Symphony Extension Apps

License

Notifications You must be signed in to change notification settings

anthony-symphony/sym-support-share-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extensions Share Example

This is a quick and barebones example on how to use the Symphony share feature to open up shared pages within Symphony. Code is provided AS-IS and is to be used as reference.

Prerequisites

  • Have 'node and 'npm' installed
  • Have port 3000 available. 3000 is used by default but, can be changed.

How to run

How to use

After adding the sample app you should see a new entry in the leftnav. From there you can share 2 premade articles which are hosted on the app itself or share any site you want.

Note: The site you share must not have X-Frame-Options set or it will fail to load due to browser security.

Sharing article via a Bot

In order to create the Share Button via a Bot you can use the Share API https://developers.symphony.com/restapi/reference#share-v3

For this extension app the body would be something like this

{
   "type": "com.symphony.sharing.article",
   "content":{
        "articleId":"example-6789",
        "title": "Article 6789",
        "description": "Check this out",
        "publisher": "Symphony Support Publisher",
        "thumbnailUrl": "https://localhost:3000/news-icon.png",
        "author": "Symphony Support Engineer",
        "summary": "This is a sample share payload to share the article 6789",
        "appId": "sym-support-share-sample",
        "appName": "Symphony Share Sample",
        "appIconUrl": "https://localhost:3000/news-icon.png"
    }
}

About

Short example of how to use the share feature in Symphony Extension Apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published