Rich Publisher Apps platform

The Rich Publisher Apps platform gives you all the necessary tools for creating and integrating interactive apps into your feed’s publisher.

There are three ways to add a Rich Publisher App to your community.

1. Get it from AppExchange.

2. Build a custom app in your org.

3. Port an app through change sets or packages.

Creating Rich Publisher App:

1. Create the below Lightning Components.

Composer Component:


<aura:component implements=”lightning:availableForChatterExtensionComposer”>
    
    <aura:attribute name=”options” type=”List” default=”[
    {‘label’: ‘Thank You’, ‘value’: ‘Thank You’},
    {‘label’: ‘Amazing Work’, ‘value’: ‘Amazing Work’}
    ]”/>
    <aura:attribute name=”selectedVal” type=”String”/>
    
    <lightning:radioGroup label=”Radio Button Group”
                          options=”{! v.options }”
                          value=”{! v.selectedVal }”
                          onchange=”{!c.appreciate}”/>
    
</aura:component>


Composer Component Contrller:


({
    
appreciate: function(cmp, event, helper) {
        var compEvent = cmp.getEvent(“sendChatterExtensionPayload”);
        var selectedValObj = {value : cmp.get(“v.selectedVal”)};
        compEvent.setParams({
            “payload” : selectedValObj,
            “extensionTitle” : “Apprecication”,
            “extensionDescription” : “Appreciation”
        });
        compEvent.fire(); 
    }
    
})


Renderer Component:


<aura:component implements=”lightning:availableForChatterExtensionRenderer”>
    
    {!v.payload.value}
    
</aura:component>

2. Go to Chatter Tab.Upload an icon to refer. In my example I have used Appreciation icon.

3. Get the File Id.

4. Go to https://workbench.developerforce.com/login.php and log in.

5. Go to Utilities –> REST Explorer.

6. Do a POST request with the below URL and body as {}.

/services/data/v43.0/connect/files/069f40000017eed/asset

069f40000017eed is the file id from step 3.

7. Get the fileAsset id.

8. Go to Data –> Insert.

9. Select ChatterExtension. Select Single Record. Click Next button.

10. Enter the values as below and click Confirm Insert.

Adding Rich Publisher App to Community:

1. Go to All Communities.

2. Select the Community for which you want Rich Publisher Apps.

3. Select Administration.

4. Click Rich Publisher Apps.

5. Select the apps and save.

Output:




Leave a Reply