30.03.2014 Views

Database.com Chatter REST API Developer's Guide - Salesforce.com

Database.com Chatter REST API Developer's Guide - Salesforce.com

Database.com Chatter REST API Developer's Guide - Salesforce.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Chatter</strong> <strong>API</strong>: How do I. . .<br />

HTTP method:<br />

Request body:<br />

Request body example:<br />

POST<br />

The appropriate container input, such as <strong>com</strong>ment input or feed-item input, with the message<br />

segment input: mention<br />

{ "body" :<br />

{<br />

"messageSegments" : [<br />

{<br />

"type": "mention",<br />

"id" : "005D0000001GpHp"<br />

},<br />

{<br />

"type": "text",<br />

"text" : " Did you see the new plans?"<br />

}<br />

]<br />

}<br />

}<br />

Note: No spaces are added either before or after the @mention, so the text message<br />

segment includes a space.<br />

Returns<br />

Feed Item<br />

Post multiple @mentions<br />

Resource:<br />

HTTP method:<br />

Request body:<br />

To post a feed-item with multiple @mentions, use one of the feed resources, such as<br />

/chatter/feeds/user-profile/userId/feed-items. To post a <strong>com</strong>ment with<br />

multiple @mentions, use the Feed-Items resource:<br />

/chatter/feed-items/feedItemId/<strong>com</strong>ments.<br />

POST<br />

The appropriate container input, such as <strong>com</strong>ment input or feed-item input, with multiple<br />

Message Segment Input: Mention bodies.<br />

31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!