• kodeX
  • NEWBIE
  • 100 Points
  • Member since 2011

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 45
    Replies

Using Web Services API:-

From the whole news feed, Is there any way to Follow/Unfollow a specific post?

  • January 20, 2012
  • Like
  • 0

After executing the following SOQL query in Web Services API.

Select Body, Title, Type From CollaborationGroupFeed WHERE ParentId='0FB900000008ov2GAA'

OR

 

SELECT FeedPost.FeedItemId,FeedPost.Body,(Select Body, Title From CollaborationGroupFeed WHERE ParentId='0FB900000008ov2GAA') FROM NewsFeed ORDER BY CreatedDate DESC LIMIT 20

 

The ParentId, is the ID of the group that i want to query.

 

(I have included partner-18.jar and wsc-20.jar)

 

Why is it giving error below?

Exception in thread "main" [InvalidSObjectFault [ApiQueryFault [ApiFault  exceptionCode='INVALID_TYPE'

exceptionMessage='sObject type 'CollaborationGroupFeed' is not supported.']

 

 

 

  • January 08, 2012
  • Like
  • 0

Rest format for commenting is-

../chatter/feed-items/0D590000006SY64CAG/comments?text=my comment added successfully!

 

 

Above, Underlined portion is feeditemid, bold text is my comment.

 

But when i execute,

 

It gives error as -

[{"message":"The HTTP entity body is required, but this request has no entity bo
dy.","errorCode":"JSON_PARSER_ERROR"}]

 

There are methods-> setRequestHeader, setParams in HttpMethod interface,

but there is no method like "setEntityBody".

 

How to set the entity body in HttpMethod?

 

 

 

  • January 05, 2012
  • Like
  • 0

After executing the following SOQL query-

 

SELECT FEEDPOST.BODY,FEEDPOST.FEEDITEMID,FEEDPOST.PARENTID,"+
                "(SELECT Id, CommentBody FROM FEEDCOMMENTS) FROM" +
                " NEWSFEED WHERE TYPE = 'USERSTATUS' ORDER BY CreatedDate  DESC, ID DESC");

 

In Soap, How to get the CommentBody while iterating in the loop?

 

1. s.getChild("FeedComment").getField("CommentBody") OR

2. s.getChild("CommentBody").getValue();

 

Note that Above 2 statements dont yield successful results!

 

What is the solution?

  • January 02, 2012
  • Like
  • 0

Here,

0FB900000008hoTGAQ is my group id.

(Validity Proof- I could successfully fetch group feed using above group id.)

 

 

To post to a group std Rest api uri syntax is -

https://na1.salesforce.com/services/data/v23.0/chatter/feeds/record/groupId/feed-items?text=new+post

 

Similarly i gave,

https://na1.salesforce.com/services/data/v23.0/chatter/feeds/record/0FB900000008hoTGAQ/feed-items?text=Hello+to+my+group

 

 

Why is it giving Error? -

[{"message":"Parent ID: id value of incorrect type: 0FB900000008hoTGAQ","errorCo
de":"INVALID_FIELD"}]

 

  • December 27, 2011
  • Like
  • 0

As given in salesforce chatter REST api documentation,

I am trying to access Chatter using the following cUrl statement-

 

curl -X --insecure GET https://na1.salesforce.com/services/data/v23.0/chatter/users/me 
     -H 'Authorization: OAuth 00DD0000000FJ6T!AQkAQPde_DMF2vGzddfZmBRS95Goj DbtArKkgukAgZP0OVFYY5KkAqhLw9ejeKIlpJ3FgwGAWeRlBiWRt8mfXEuAZGbZNosk'

 

 

I have fitted my access token exactly after 'OAuth' in the above format.

 

After execution on  cmd prompt of above cUrl stmt,

cUrl is giving the following error-

 

curl: (6) Could not resolve host: GET; Host not found
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
curl: (6) Could not resolve host: OAuth; Host not found
curl: (6) Could not resolve host: 00DD0000000FJ6T!AQkAQPde_DMF2vGzddfZmBRS95GojDbtArKkgukAgZP0OVFYY5KkAqhLw9ejeKIlpJ3FgwGAWeRlBiWRt8mfXEuAZGbZNosk'; No data record of requested type

 

Please carefully see that i have given the "--insecure" option to disable certificate verification.

 

Why is cUrl unable to resolve the salesforce website address?

How to solve this?

 

Seriously, my chatter project is at a standstill and so a quick fix for above problem is needed!

Sincerely,

kodeX

  • December 25, 2011
  • Like
  • 0

Hi, i am trying to add a comment to a Post through java SOAP code.

 

Here is the code snippet-

 

..

string feeditemid= "0D53000000aZwx6CAC" (i.e- id of the Post to which i want to add the comment)

string comment= "This is a comment from me"

..

 

SObject s=new SObject();
       s.setType("FeedComment");
       s.setId(feeditemid);

       s.setField("CommentBody",comment);
      
       SaveResult[] results= connection.update(new SObject[]{s});
       if (!results[0].isSuccess()) {
               System.out.println("Error updating user status: "
                 + results[0].getErrors()[0].getMessage());
               }
               else {
                  System.out.println("Comment added successfuly");
                  }
  


It is giving error-

Error updating user status: '0D53000000aZwx6CAC' is not a valid Salesforce ID for the type Feed Comment

 

Note-

The type of ID for FeedComment object, is of "reference" field type.

 

How to convert simple string ID to a "reference" type ID ?

Any other API function i need to call?

  • December 22, 2011
  • Like
  • 0

I am trying to understand chatter Rest api from months, I have only understood the flow.

Before coding in any new language, we understand the primitive data types, simple hello world example, use of methods, return types etc.

I am good at Java.

My question is to how to use classes of chatter REST api in Java.

Rest api returns information in JSON/XML format, but how to store such a format in Java made grasping difficult for me.

 

I have already referred salesforce chatter api documentatn a lot, but i found it complete but at very top level( i.e- they have only given classes and code snippets to follow,post,delete etc)

 

Where can i get an easy tutorial for implementing chatter rest api applications in Java from scratch??

 

 

 

  • December 15, 2011
  • Like
  • 0

Hello developers!

 

I am new to the chatter api.

I want to develop an app, a menu driven java app, that performs basic chatter operations through command line.

I am a java programmer by heart, and I have become really fond of chatter.

 

I have searched a lot for any java examples to access chatter resources like comments, posts, user details, but I have not found any sufficient material to start coding.

I found only two examples, one of which is to read posts from the user's profile and other to post a message on chatter.

 

It would be very supportive if I could get any links on how to use chatter api using java( not just chatter api documentation, but a good step by step tutorial)

Please guide!

 

 

Thank You.

 

 

 



  • October 20, 2011
  • Like
  • 0

Hello

Please, I am very new to Chatter and Salesforce for that matter (and have no experience coding for it yet), and need to remove email addresses from displaying on Chatter. I was told it could be accomplished using CSS, but can't find any information on where to access the CSS. Could someone please be kind enough to tell me a "For Dummies" way to access that code so I could modify it? Taking steps to acquaint myself with it all, but the learning curve might take me a little while and this is a change I need to make right now.
Many thanks in advance. 

Using Web Services API:-

From the whole news feed, Is there any way to Follow/Unfollow a specific post?

  • January 20, 2012
  • Like
  • 0

Hi SF

 

I have Created a Chatter only user and now I want to view the Dashboard of my admin but unable to do so and has encountered with an error

 

You do not have level of access necessary to perform the operation you requested

 

I have given all necessary permissions required

 

Thanks in advance

  • January 20, 2012
  • Like
  • 0

 

Hello,

 

How to manage People in Chatter Tab?

 

The "People" option displays all the Users from that Org. I want to handle this User list.

 

Is there any way to do it?

 

Thanks,
Devendra

can we extract the chatting history in the chatter?

  • January 18, 2012
  • Like
  • 0

Hello Board,

 

I have couple of queries with respect to Chatter customization.

 

Scenario:

Suppose there are 10 Users in one org.

 

Suppose there are three public groups A, B , C.

 

Users in group A should able to view all records from the Org.

 

Users in group B must able to view all records created by Users who belongs to Group B.

 

Users in group C must able to view all records created by Users who belongs to Group C.

 

Users in Group B should not view records related to Group C and vice versa.

 

Users in Groupd A should able to see all records.

 

And the last is Users of Group A can assign records to Group B and C.

 

I was also looking for a way to disable unfollow functionality. So that Users in Group B will never get a chance to follow users in Group C. But all Users in Org are visible in People section, which makes Unfollow functionality impossible.

 

Chatter update should be based on above criterias.

 

Is there any way for such customization in Chatter?

 

Thanks,

Devendra

i want to integrate my exisiting web application with chatter please help i am using .net platform

what i have to do for fast integration or i get only gateway for chatter i have to code & design

my priority is i dnt want to consume time on design i want chatter as a module that can be added in my application so please guide me.

  • January 13, 2012
  • Like
  • 0

Hi,

 

Is it possible to follow people not just their profile, but also what changes they made to the campaign record(same thing when you follow a specific record)?

 

thanks,

markpogi

  • January 13, 2012
  • Like
  • 0

The customer wants to know if Chatter feeds can be accessed by the Authenticated Sites User/High Volume Customer Portal user.  If they cannot access, what are the alternatives?

 

Thanks!

 

Kalyan

www.convnimbus.com

Is it possible to use APIChatter API to upload a new version of an existing file.  I see how to upload a new file but not a new version (e.g. go from V 1 to 2).    

 

Any help would be appreciated. 

  • December 29, 2011
  • Like
  • 0
At the top of the page at Salesforce there is an option for LEADS and EVENTS
I always go to the LEADS section and put in the name and information of the LEAD.
The LEAD is a company that will rent my Event space many times over the year.
Now I go to the EVENT section and click on NEW 
A new section for Event opens up and I go the the CELL that says LEAD and look up the Lead.
After choosing the lead the Cell populates with the name of the LEAD.  All this is good
BUT :
Why is only the name coming up - I would also like to see the other information i put in about this lead - like telephone number / company name etc. so that i do not need to type it in again - is there anything that can be done ?
 thank you 
olmglobal@gmail.com

Hi, i am trying to add a comment to a Post through java SOAP code.

 

Here is the code snippet-

 

..

string feeditemid= "0D53000000aZwx6CAC" (i.e- id of the Post to which i want to add the comment)

string comment= "This is a comment from me"

..

 

SObject s=new SObject();
       s.setType("FeedComment");
       s.setId(feeditemid);

       s.setField("CommentBody",comment);
      
       SaveResult[] results= connection.update(new SObject[]{s});
       if (!results[0].isSuccess()) {
               System.out.println("Error updating user status: "
                 + results[0].getErrors()[0].getMessage());
               }
               else {
                  System.out.println("Comment added successfuly");
                  }
  


It is giving error-

Error updating user status: '0D53000000aZwx6CAC' is not a valid Salesforce ID for the type Feed Comment

 

Note-

The type of ID for FeedComment object, is of "reference" field type.

 

How to convert simple string ID to a "reference" type ID ?

Any other API function i need to call?

  • December 22, 2011
  • Like
  • 0

How to retun a list valuea in single chatter feed using chatter?

 

I have 5 note records. when i insert a 6th value, all 6 value in display in single chatter feed. now it displayed in 6 chatter feed.

 

my code

 

 List<FeedItem> feedItems = new List<FeedItem>();  
   
    
     List<Opportunity> lstOpportunity= [select name,id from Opportunity];

 

  for (note Trinote : Trigger.new) {      
        for(Opportunity opp: lstOpportunity){    
          List<Note> lstnote=[select Body,Title,ParentId,OwnerId from note where ParentId=:Opp.id ];                  
          for(integer i = 0; i < lstnote.Size(); i++) {   
         FeedItem fitem = new FeedItem();
         // fitem.ParentId = opp.id;
          // fitem.LinkUrl = '/' + Trinote.id; //This is the url to take the user to the note
          fitem.Body =  + '\nTitle :' + lstnote[i].Title
                        + '\nBody :'  + lstnote[i].Body
                        + '\nOpportunity name :' + opp.name;
              feedItems.add(fitem) ;                      
                }

 

if (feedItems.size() > 0) {
        Database.insert(feedItems); //notice the false value. This will allow some to fail if Chatter isn't available on that object
    }

 

Hi,

 

Is there any way in chatter to restrict user from following another User?

 

Thanks and Regards,

Devendra S