• javamate
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

I have a Chatter client (in-browser on non-saleforce.com domain) that I am trying to enhance to support the display of image previews for attachments to ContentPost feed items in v24.0 of the Chatter REST API.  I see that the Feed Item Attachment: Content response body contains a property called hasImagePreview which returns true or false.  What I don't see is any kind of reference to the preview image.

 

I read the post on Download Attachments via Chatter REST API and I understand that in order to display the full image I would need to download it by pasing in the OAuth token in the request header.  I presume the same would be true for the preview image, but I'm unclear how to get the preview image.  Is there an extra parameter that needs to be specified with the request to the downloadUrl in order to get the preview?

I have a Chatter client (in-browser on non-saleforce.com domain) that I am trying to enhance to support the display of image previews for attachments to ContentPost feed items in v24.0 of the Chatter REST API.  I see that the Feed Item Attachment: Content response body contains a property called hasImagePreview which returns true or false.  What I don't see is any kind of reference to the preview image.

 

I read the post on Download Attachments via Chatter REST API and I understand that in order to display the full image I would need to download it by pasing in the OAuth token in the request header.  I presume the same would be true for the preview image, but I'm unclear how to get the preview image.  Is there an extra parameter that needs to be specified with the request to the downloadUrl in order to get the preview?

I have an application using oAuth for authorization. It's been working fine for months. Over the weekend, issues started happening and after digging into it, it appears that while the authorization is successful (response 200 with valid JSON object returned), we're no longer receiving a refresh token after authorization.

 

Here is the oAuth request/response:

REQUEST:
https://login.salesforce.com/services/oauth2/token?grant_type=authorization_code&client_id=[my_app_client_id]&client_secret=[my_app_client_secret]&redirect_uri=[my_app_redirect_url]&code=[the_auth_code_we_receive_during_authorization]

 

RESPONSE:

{

"id":"https://login.salesforce.com/id/00D30000000AAAAAAA/0053000000KKKKKK",
"issued_at":"1328965006241",
"scope":"full",
"instance_url":"https://[my_org].my.salesforce.com",
"signature":"J/YL4wUXF[stuff]ielR+GLrcBuDz/kHOJs3nKNs=",
"access_token":"00D30000000AAAA!AREAQHAQpw[stuff]ABL50MBOQVPsN.TTnrrvN2gAGNsrJHhK3ehSQvYU[stuff]MfqreLBp3eDXMnCNdJRl3"
}

 

This request is supposed to return a request_token parameter with the JSON response -- and it *always* has in the past. Docs here: http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com