function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hi,
Is there a way or an example chatter post with attachment in JSON using base64 encoding?
Thank you!
Hello,
Please refer following links:
http://salesforce.stackexchange.com/questions/1301/image-upload-to-chatter-post
http://www.salesforce.com/us/developer/docs/chatterapi/Content/connect_resources_input.htm#cc_attach_new_file
I'm guessing that you want to generate JSON output on Visualforce page with attachment.
If so, may be this can help you.
Controller:
public String DispResult { get; set; } String soql = 'SELECT Id, (SELECT Id, CommentBody, CreatedDate, CreatedById, CreatedBy.FirstName, CreatedBy.LastName FROM FeedComments ORDER BY CreatedDate DESC) FROM FeedItem ORDER BY CreatedDate DESC'; List<FeedItem> myoutput = Database.Query(soql); DispResult = JSON.serializePretty(myoutput);
Page:
<apex:page standardController="FeedItem" extensions="extentionname" cache="true" contentType="application/json"> {!DispResult} </apex:page>
Hope this will help.
-Saw
Hello,
Please refer following links:
http://salesforce.stackexchange.com/questions/1301/image-upload-to-chatter-post
http://www.salesforce.com/us/developer/docs/chatterapi/Content/connect_resources_input.htm#cc_attach_new_file
I'm guessing that you want to generate JSON output on Visualforce page with attachment.
If so, may be this can help you.
Controller:
Page:
Hope this will help.
-Saw