function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mms.testsmms.tests 

How to display thumbnail of the uploaded images using FeedItem.ContentData?

I am using FeedItem to query my Chatter feeds. Some feeds have images attached. I can get the ContentData and ContentFileName back, but how can I display them?

 

I tried to append the ?oauth_token to the ContentData, also add the instanceUrl to the ContentData, but the images do not show up on my feed display page. 

 

I am using forcetkClient.query method to get the FeedItem.

 

Thanks in advance for any help!

Best Answer chosen by Admin (Salesforce Developers) 
digamber.prasaddigamber.prasad

You can use /services/data/v29.0/chatter/feeds/news/me/feed-items REST API call and it will give downloadUrl as /services/data/v29.0/chatter/files/06940000000WXc1AAG/content?versionNumber=1 and you can use it for further business objective.

 

Please let me know if you have any other question.

 

Regards,

Digamber Prasad

All Answers

mms.testsmms.tests

Also tried suggestion from this post by setting the request header "Bear_Token" to true, but I didn't see the ContentData URL change. Do I have to use the FeedItem Rest API ?

http://boards.developerforce.com/t5/Chatter-and-Chatter-API/How-to-display-thumbnail-image-of-attached-picture-in-a-feed/m-p/658655/highlight/true#M3076

 

digamber.prasaddigamber.prasad

You can use /services/data/v29.0/chatter/feeds/news/me/feed-items REST API call and it will give downloadUrl as /services/data/v29.0/chatter/files/06940000000WXc1AAG/content?versionNumber=1 and you can use it for further business objective.

 

Please let me know if you have any other question.

 

Regards,

Digamber Prasad

This was selected as the best answer