You need to sign in to do that
Don't have an account?
Cannot insert FeedItem to a Chatter Group
I am using Java with the SOAP api to transfer Chatter records. I cannot post messages to existing Chatter groups.
The code below is simple Java code that tries to create a new FeedItem, add it to a group and insert the record. I have confirmed that the userID is correct, the groupId is correct AND the user belongs to the group. The user account I am using to do the transfer has the "Manage Chatter Messages" enabled. I am using API v 25.
Why is my attempt to post to a group failing?
The error message I get is: The Insert failed because: insufficient access rights on cross-reference id
String userID = "005E0000001JywAIAS"; String groupId = "0F9E0000000Tp2mKAC"; FeedItem newFeed = new FeedItem(); Calendar greg = Calendar.getInstance(); greg.add(Calendar.HOUR, -48); //newFeed.setId(feed.getId()); newFeed.setBody("Faked ITEM GROUP test"); newFeed.setParentId(groupId); newFeed.setCreatedDate(greg); newFeed.setCreatedById(userID); List<FeedItem> list = new ArrayList<FeedItem>(); list.add(newFeed); loginCentral(); SObject[] objs = new SObject[1]; objs[0]=newFeed; uploadRecords(objs); logout();
All Answers
Even when the user is part of the group, the above code doesn't create a new feed item. I was using the following: