You need to sign in to do that
Don't have an account?
ContentDocument is not enabled for feed items of type ContentPost
Hi,
I got following issue while share selected slides or active work book in chatter with .Net. We are integrated chatter with our .Net application.
Error :
{\"message\":\"ContentDocument is not enabled for feed items of type ContentPost\",\"errorCode\":\"INVALID_FIELD\"}
Here is my code.
=================================
byte[] boundarybytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + Boundary + "\r\n");
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(url);
if (this.Proxy != null)
wr.Proxy = this.Proxy;
wr.Timeout = 600000; // 10 minutes
wr.ContentType = ContentType + "; boundary=" + Boundary;
wr.Method = "POST";
wr.KeepAlive = true;
wr.ServicePoint.Expect100Continue = false;
wr.Headers.Add("Authorization: OAuth " + sessionId);
Stream rs = wr.GetRequestStream();
byte[] partBytes;
foreach (HttpMultipartRequestPart part in parts)
{
rs.Write(boundarybytes, 0, boundarybytes.Length);
partBytes = System.Text.Encoding.UTF8.GetBytes(part.ToString());
rs.Write(partBytes, 0, partBytes.Length);
if (part.BodyType == HttpMultipartRequestPart.BODY_TYPE_FILE)
part.WriteFile(rs);
else if (part.BodyType == HttpMultipartRequestPart.BODY_TYPE_BYTES)
part.WriteBytes(rs);
}
byte[] trailer = System.Text.Encoding.ASCII.GetBytes("\r\n--" + Boundary + "--\r\n");
rs.Write(trailer, 0, trailer.Length);
rs.Close();
Please help me to short out this issue.
Regards,
Keyur Patel
Hi,
This is my URL : https:/
/test-developer123-edition.my.salesforce.com/services/data/v27.0/chatter/feeds/record/000000000AAA/feed-itemsI am using Record feed.
services/data/v27.0/chatter/feeds/record/069d0000000qpcyAAA/feed-items
Hi,
I am sharing my selected slide in chatter from my .Net application.
I am using Record Feed Items and passing Parameters for attaching a new file.
jsonBody.attachment.attachmentType = "NewFile";
jsonBody.attachment.description = "test";
jsonBody.attachment.title = "FileName";
Reference Link : http://www.salesforce.com/us/developer/docs/chatterapi/Content/connect_resource_feeds_record.htm
Yes, we can try with different feed.
I tried with User Profile (user-profile) feed but it is getting me a error.
[{"message":"Invalid subject identifier: 069d0000000qJnBAAU","errorCode":"INVALID_ID_FIELD"}]
The subject identifier for the user-profile feed needs to be a user ID (user IDs start with "005") or "me".
Just to be clear: you can use any type of feed, including the record feed, but you can't use a ContentDocument ID as the subject ID.