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
mobillemobille 

Chatter api

Hi All,

 

I want to display chatter infromation like comments count,post count,messages,status etc.

iam using url :

https://ap1.salesforce.com/services/data/v24.0/chatter/feeds/news/me?Authorization:OAuth

"my accesstoken number".

iam getting response

<Errors>
<Error>
<errorCode>INVALID_SESSION_ID</errorCode>
<message>Session expired or invalid</message>
</Error>
</Errors>.
but iam sure my acceess token is not expired because iam getting profile info with the same accees token.
am i was sending worng parameter(Authorization:OAuth)can anyone help me?
can anubody give example url.
Thank You,
Sandeep kumar


cloudcodercloudcoder

You can't pass the oauth token via the URL param (it's insecure). It needs to be added as a HTTP header. For example, here is what it would look like in Ruby:

 


    headers 'Authorization' => "OAuth  1234567"