• Amit Loh
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 13
    Replies
popularity or usage of chatter in enterprise. I want to put an app that works with chatter so want to know how much it is used.
I created a custom chatter feed via apex code that shows up approve reject buttons, its showing up in browser but not in chatter desktop.
 
The code works but buttons show up only in browser-
actionLinkDefinitionInput.actionType = ConnectApi.ActionLinkType.Ui;
actionLinkDefinitionInput.actionUrl = 'https://test123567.na24.visual.force.com/apex/popuppage';
actionLinkDefinitionInput.labelKey = 'Approve';
actionLinkDefinitionInput.method = ConnectApi.HttpRequestMethod.HttpGet;
actionLinkDefinitionInput.requiresConfirmation = true;
 
// To Do: Substitute an OAuth value for your Salesforce org.
requestHeaderInput1.name = 'Authorization';
requestHeaderInput1.value = 'OAuth 00DD00000007WNP!ARsAQCwoeV0zzAV847FTl4zF.85w.EwsPbUgXR4SAjsp';
//actionLinkDefinitionInput.headers.add(requestHeaderInput1);
 
requestHeaderInput2.name = 'Content-Type';
requestHeaderInput2.value = 'application/json';
//actionLinkDefinitionInput.headers.add(requestHeaderInput2);
 
// Add the action link definition to the action link group definition.
actionLinkGroupDefinitionInput.actionLinks.add(actionLinkDefinitionInput);
 
actionLinkDefinitionInput1.actionType = ConnectApi.ActionLinkType.Ui;
actionLinkDefinitionInput1.actionUrl = 'https://test123567.na24.visual.force.com/apex/popuppage';
actionLinkDefinitionInput1.labelKey = 'Reject';
actionLinkDefinitionInput1.method = ConnectApi.HttpRequestMethod.HttpGet;
actionLinkDefinitionInput1.requiresConfirmation = true;
actionLinkGroupDefinitionInput.actionLinks.add(actionLinkDefinitionInput1);
// Instantiate the action link group definition.
ConnectApi.ActionLinkGroupDefinition actionLinkGroupDefinition = ConnectApi.ActionLinks.createActionLinkGroupDefinition(Network.getNetworkId(), actionLinkGroupDefinitionInput);
 
User-added image
I have a free developer account and I was able to use apex to do some chatter customization.
How to enable or download chatter desktop app? I get 
Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. For more information, seeInsufficient Privileges Errors. 
 
how to create simple app in salesforce and publish to appexchange?
I will have 2 simple apex pages and 2apex classes. How to create and package and publish to app exchange(test free app)
I see
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/connectapi_examples_define_post_action_link.htm
Above link code works for me to post to API.
http://salesforce.stackexchange.com/questions/69472/ui-actionlink-to-salesforce1-custom-visualforce-page

but this only posts to API and second link does not have complete sample.
I need a sample code that opens up another apex page.
I tried but it gives error
// Create the action link definition.
actionLinkDefinitionInput.actionType = ConnectApi.ActionLinkType.Api; (I need this to be Ui)
actionLinkDefinitionInput.actionUrl = '/services/data/v33.0/chatter/feed-elements';
actionLinkDefinitionInput.headers = new List<ConnectApi.RequestHeaderInput>();
actionLinkDefinitionInput.labelKey = 'Post';
actionLinkDefinitionInput.method = ConnectApi.HttpRequestMethod.HttpPost;
actionLinkDefinitionInput.requestBody = '{\"subjectId\": \"me\",\"feedElementType\": \"FeedItem\",\"body\": {\"messageSegments\": [{\"type\": \"Text\",\"text\": \"This is a test post created via an API action link.\"}]}}';
actionLinkDefinitionInput.requiresConfirmation = true;
 
I created a custom chatter feed via apex code that shows up approve reject buttons, its showing up in browser but not in chatter desktop.
 
The code works but buttons show up only in browser-
actionLinkDefinitionInput.actionType = ConnectApi.ActionLinkType.Ui;
actionLinkDefinitionInput.actionUrl = 'https://test123567.na24.visual.force.com/apex/popuppage';
actionLinkDefinitionInput.labelKey = 'Approve';
actionLinkDefinitionInput.method = ConnectApi.HttpRequestMethod.HttpGet;
actionLinkDefinitionInput.requiresConfirmation = true;
 
// To Do: Substitute an OAuth value for your Salesforce org.
requestHeaderInput1.name = 'Authorization';
requestHeaderInput1.value = 'OAuth 00DD00000007WNP!ARsAQCwoeV0zzAV847FTl4zF.85w.EwsPbUgXR4SAjsp';
//actionLinkDefinitionInput.headers.add(requestHeaderInput1);
 
requestHeaderInput2.name = 'Content-Type';
requestHeaderInput2.value = 'application/json';
//actionLinkDefinitionInput.headers.add(requestHeaderInput2);
 
// Add the action link definition to the action link group definition.
actionLinkGroupDefinitionInput.actionLinks.add(actionLinkDefinitionInput);
 
actionLinkDefinitionInput1.actionType = ConnectApi.ActionLinkType.Ui;
actionLinkDefinitionInput1.actionUrl = 'https://test123567.na24.visual.force.com/apex/popuppage';
actionLinkDefinitionInput1.labelKey = 'Reject';
actionLinkDefinitionInput1.method = ConnectApi.HttpRequestMethod.HttpGet;
actionLinkDefinitionInput1.requiresConfirmation = true;
actionLinkGroupDefinitionInput.actionLinks.add(actionLinkDefinitionInput1);
// Instantiate the action link group definition.
ConnectApi.ActionLinkGroupDefinition actionLinkGroupDefinition = ConnectApi.ActionLinks.createActionLinkGroupDefinition(Network.getNetworkId(), actionLinkGroupDefinitionInput);
 
User-added image
I have a free developer account and I was able to use apex to do some chatter customization.
How to enable or download chatter desktop app? I get 
Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. For more information, seeInsufficient Privileges Errors. 
 
I see
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/connectapi_examples_define_post_action_link.htm
Above link code works for me to post to API.
http://salesforce.stackexchange.com/questions/69472/ui-actionlink-to-salesforce1-custom-visualforce-page

but this only posts to API and second link does not have complete sample.
I need a sample code that opens up another apex page.
I tried but it gives error
// Create the action link definition.
actionLinkDefinitionInput.actionType = ConnectApi.ActionLinkType.Api; (I need this to be Ui)
actionLinkDefinitionInput.actionUrl = '/services/data/v33.0/chatter/feed-elements';
actionLinkDefinitionInput.headers = new List<ConnectApi.RequestHeaderInput>();
actionLinkDefinitionInput.labelKey = 'Post';
actionLinkDefinitionInput.method = ConnectApi.HttpRequestMethod.HttpPost;
actionLinkDefinitionInput.requestBody = '{\"subjectId\": \"me\",\"feedElementType\": \"FeedItem\",\"body\": {\"messageSegments\": [{\"type\": \"Text\",\"text\": \"This is a test post created via an API action link.\"}]}}';
actionLinkDefinitionInput.requiresConfirmation = true;